homepage Welcome to WebmasterWorld Guest from
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

div id "wrapper" won't "wrap" in firefox

5+ Year Member

Msg#: 3460565 posted 6:12 pm on Sep 25, 2007 (gmt 0)

I have been trying to debug this for quote some time and am convinced I must be doing something wrong css-wise

Basically I have a div "cwrap" which is suppost to wrap all of the main content, it appears fine in ie, however in firefox it wont wrap it

any help would be apreciated this is driving me nuts


[edited by: Robin_reala at 6:44 pm (utc) on Sep. 25, 2007]
[edit reason] No URLs please [/edit]



WebmasterWorld Senior Member 10+ Year Member

Msg#: 3460565 posted 6:49 pm on Sep 25, 2007 (gmt 0)

This is the classic float enclosing bug that IE exhibits. Parents shouldn't enclose their floated children according to the specs; the canonical example is a floated picture extending out of the bottom of its parent <p>. IE however thinks differently: if you trigger a proprietary behaviour called hasLayout then it will. In this case, the width you've set on your wrapper has triggered this, so it's enclosing the children.

In Firefox and other compliant browsers there are a few ways of getting the behaviour you can, the quickest and easiest of which is simply to set overflow:auto on the container.

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