homepage Welcome to WebmasterWorld Guest from 54.161.240.10
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

    
Another container doesn't hold float issue.
Walley




msg:3923400
 9:38 am on May 31, 2009 (gmt 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]

 

jameshopkins




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

Apply 'overflow:auto', 'overflow:hidden', or use the clearfix method to #container.

Walley




msg:3923567
 8:58 pm on May 31, 2009 (gmt 0)

Thanks for the help.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved