Welcome to WebmasterWorld Guest from 54.221.49.52

Forum Moderators: not2easy

Message Too Old, No Replies

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

     

nicks0r

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

5+ Year Member



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

thanks

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

Robin_reala

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

WebmasterWorld Senior Member 10+ Year Member



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.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month