How could I add a background image to the left column in the code below? body { font:normal 11px Verdana, Arial, Helvetica, sans-serif; background-color:#000; margin:0px; padding:0px; margin-bottom:15px; } a { color:#660033; } a img { border:0px; } .canvas { width:770px; background-color:#eee; margin:auto; } .header { height:76px; background-color:#660033; text-align:center; padding:10px 0px; } .bar { height:2px; background-color:#eee; font-size:1px; border-top:2px solid #000; border-bottom:2px solid #000; } .main { background-color:#e5e5e5; height:100%; } .lcol { float:left; width:170px; } .rcol { float:right; width:550px; background-color:#fff; height:100%; padding-left:20px; padding-right:20px; padding-top:40px; } .footer { font-size:10px; text-align:center; line-height:25px; color:#666; background-color:#000; clear:both; } .footer a { color:#fff; text-decoration:none; } .footer a:hoverc { text-decoration:underline; } .vmenu { background-color:#fff; line-height:25px; color:#666; font-weight:bold; padding-left:15px; border-bottom:1px solid #e5e5e5; } .madd { text-align:center; margin:20px 0px; } .mblock a { text-decoration:none; color:#666; } Code (markup): Thanks,
Is there any real advantage to shorthand? I mean, if your stylesheet were a mile long, I see how it could be useful, but in everyday use is it essentially the same?
Shorter CSS-stylesheets load faster. Since your visitors are going to download the whole CSS-file for every page they see, it needs to be as light as you can make it. Hence shorthand is a very good idea.
Most browsers will cache a stylesheet so users don't need to download it more than once. Obviously its still preferable to make it as short as possible.
A prime reason for shorthand notation is ease of human readability. The computer doesn't care, but when you're trying to alter or debug the css, good formatting and sensible rulesets make a huge difference in the time and effort it takes. It is a Good Thing® to write your code as if the maintainer is a violent psychotic who knows where you live. cheers, gary