I'm trying to make a simple design where the most important factor is compatibility: IE 5.5+ Firefox 3+ Safari 5+ Chrome 7+ I tried using a same height column and a footer, but if you detect browser problems we can drop the same height column css code and just use faux columns. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>Test</title> <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" /> <meta name="description" content="Test" /> <meta name="keywords" content="test" /> <link rel="stylesheet" type="text/css" href="style.css" media="screen" /> </head> <body> <!--[if IE]> <style type="text/css"> div {zoom:1; height: 1%;} </style> <![endif]--> <div class="wrapper"> <div class="header"> <p>Header</p> </div> <div class="column" id="left"> <p>Left Column</p> </div> <div class="column" id="content"> <h1>Content</h1> </div> <div class="column" id="right"> <p>Right Column</p> </div> <div class="footer"> <p>Footer</p> </div> </div> </body> </html> Code (markup): /* CSS */ body { font-family: Arial, Helvetica, sans-serif; font-size:13px; color: #fff; padding:0; margin:0; text-align: center } .wrapper { width:960px; margin:0 auto; text-align:left } .header { width: 100%; height:50px; float: left; padding: 0px; margin: 0; background: #333 url(none) top left repeat-y } .column { float:left; height:350px } #left { width:260px; background: #333 url(none) top left repeat-y } #content { width:500px; background: #333 url(none) top left repeat-y } h1 { font-size: 24px; margin: 0 } #right { width:200px; background: #333 url(none) top left repeat-y } .footer { clear:both; width: 100%; padding:0px; margin:0; height:100px; background: #333 url(none) top left repeat-y } Code (markup):
It's working fine in all recent browsers, but I haven't tested in old ones, like IE5 or IE6. I just want to make it better if possible. Note: It also validates, I spent quite a few hours with this...
My only suggestion would be to move the if IE style declaration into the <head></head> area rather than the <body> Other than that, it looks great... I don't foresee issues with that code at all... see what you get from browsershots.org - - Pretty good source for early rendered screen shots... Cheers!~
Oh, you are right, it should be in the head, my bad! Thank you! Browsershots is becoming very slow... and sometimes shots are expiring even before being shown. I searched and found a tool for IE testing, but I haven't installed it yet, will do it in a virtual machine.
Nice one - I'll have to install that and test it myself... Thanks for the link... @Coupons = yeah I know about browsershots.... kinda sucks... that tool used to ROCK!.. oh well... Cheers!~