Forum Moderators: not2easy
So here's the CSS and the HTML:
body {
margin:30px;
background-color:#693;
padding:0;
}
div {
background-color:#fff;
}
.subnav {
width:200px;
height:300px;
background-color:#999;
}
.main {
height:500px;
}
.login {
position:absolute;
top:180px;
left:10px;
width:150px;
height:40px;
background-color:#ccc;
}
.top {
height:120px;
width:100%;
margin-bottom:10px;
}
<div class="top">Top</div>
<div class="login">Login</div>
<div class="subnav" style="float:left; margin-right:10px;">Sub Nav</div>
<div class="main">Main</div>
So it's supposed to be a "top" bit, then a left hand nav 200px wide, then a main section to fill the rest of the width. Firefox though, seems to put the main div underneath the nav section rather than next to it...
Any thoughts?
The best way would be to float the left div and add a certain percentage width (say 20% if you remove the right margin) and then float and add a width of 80% to the main div.