Saturday 26 November 2011

HTML and CSS

As i was re-designing this blog, checking out examples etc, I noticed a few things i didnt seem to be able to do, like bordering specific code etc (virtually no HTML knowledge btw), so a quick look and i created a nice template using <code> and <breakquote> etc, but there seemed to be alot of code needed for what I wanted and it wasnt very practical. Thats when I found CSS.
So far its been absolutely lovely, very simple, quick and useful (so far anyways) so I took the html template and remade it into css, with a few differences, add tied to the <code> class, which now allows me to use white space, padd, fill etc very quickly, so I thought i'd share it as I had to take pieces from here and there (mainly the css documentation actually).
(I only bothered commenting on the not 100% bleedin' obvious)
.post code{ width:613px; margin: 10px 0px 10px 0px !important; background-color: #444444; font:13px arial,sans-serif; line-height:20px; /*spacing between lines*/ color: #df7401; white-space:pre-wrap;/*preserve white space but keep word wrapping*/ border:solid 1px #777777 !important; border-collapse:separate; padding: 8px !important; /*inside margins of border and text*/ float: left; /*objects orientation (not text, but whole object)*/ }

No comments:

Post a Comment