Welcome to WebmasterWorld Guest from 54.147.212.98

Forum Moderators: not2easy

Message Too Old, No Replies

Another container doesn't hold float issue.

   
9:38 am on May 31, 2009 (gmt 0)

5+ Year Member



Can't seem to get this after googling and reading several threads. My container can't hold my floats in FF.

I don't want to float my container to fix the issue because it will not be centered anymore.

Can't use clear on left because right will not float anymore.


#container {
width:600px;
min-height:150px;
background-color:#000000;
margin-left:auto;
margin-right:auto;
margin-top:5px;
clear:both;
}
.left {
width:150px;
float:left;
margin-top:5px;
}
.right {
width:450px;
min-height:150px;
float:right;
background-color:#e5e5e5;
}
<div id="container">
<div class="left">
small left content
</div>
<div class="right">
lots of content here
</div>
</div>

[edited by: Walley at 9:38 am (utc) on May 31, 2009]

10:42 am on May 31, 2009 (gmt 0)

5+ Year Member



Apply 'overflow:auto', 'overflow:hidden', or use the clearfix method to #container.
8:58 pm on May 31, 2009 (gmt 0)

5+ Year Member



Thanks for the help.