PDA

View Full Version : CSS Floating wrong in IE...why?


paulj
08-10-2007, 09:10 PM
Hello.I got an issue. What exactly is wrong here?Image: http://i38.photobucket.com/albums/e135/neo_spartan986/wtf.jpg The top image is the from FireFox, and the bottom is from IE. Why does the div in FF actually float over the box, but in IE, it's all contained within the white box? The...

jtg
07-30-2008, 04:49 PM
Firefox and IE calculate the height of a box differently. When Firefox's contents is "floating" (and thereby not "within" the box) it reduces the box down to only its margin and padding. IE, on the other hand, still counts the "floating" contents as being "within." At least, this is my diagnosis without having seen any of your code.

Edit the parent div CSS to include a "min-height: xxxxx" This handy command is ignored by IE, but will bully Firefox into making that box at least whatever height you dictate.