Welcome to WebmasterWorld Guest from 54.146.201.80

Forum Moderators: not2easy

Message Too Old, No Replies

Another container doesn't hold float issue.

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

New User

5+ Year Member

joined:May 1, 2009
posts:24
votes: 0


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)

Junior Member

5+ Year Member

joined:May 26, 2009
posts:107
votes: 0


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

New User

5+ Year Member

joined:May 1, 2009
posts:24
votes: 0


Thanks for the help.
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members