Fri, 2004-04-02 17:26
hi there!
i'm trying to do a layout like this
i made the code. and it looking fine in IE 6
but not working with mozilla 1.6 :oops:
<!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" lang="en"><head> <meta http-equiv="content-type" content="text/html; charset=utf-8"><title>Untitled</title> <style type="text/css" media="all"> body { background-color:#000000; } #outer { width: 750px; margin: auto; background-color: #333333; } #name { background-color: #666666; } #sidebar { float: left; width: 170px; background-color: #999999; } #itembody { float: left; width: 550px; background-color: #CCCCCC; } </style></head> <body> <div id="outer"> <div id="name"><h2>Site Name</h2></div> <div id="sidebar"> <p>Sidebar</p> <p>Sidebar</p> <p>Sidebar</p> <p>Sidebar</p> </div> <div id="itembody"> <p>itembody</p> <p>itembody</p> <p>itembody</p> <p>itembody</p> <p>itembody</p> <p>itembody</p> </div> </div> </body></html>
Fri, 2004-04-02 18:51
#1
Multi Layout ?
You will need to 'clear' the floating divs to allow the outer div to contain them.
add to css
.clear {clear:both;}
and add the html
Quote:
<p>itembody</p>
</div>
<div class="clear"></div>
</div>
</body></html>
Fri, 2004-04-02 19:02
#2
Multi Layout ?
Thanks , it work fine now