Welcome to WebmasterWorld Guest from

Forum Moderators: not2easy

Message Too Old, No Replies

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

6:12 pm on Sep 25, 2007 (gmt 0)

New User

10+ Year Member

joined:Sept 25, 2007
votes: 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]

6:49 pm on Sept 25, 2007 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:June 26, 2004
votes: 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

on the container.