PDA

View Full Version : Double margins



Icy Penguin
March 13th, 2007, 03:09 AM
I ran into some problems in IE where if you put a floated div inside another floated div, the margins double.

i.e.,



<div style="float: left">
<div style="float: left; margin: 10px;>
Oh noes! This div will have a margin of 20px in Internet Explorer!!!
</div>
</div>

simplistik
March 13th, 2007, 09:31 AM
Don't hijack someone else's thread next time. Even better yet do a search.

It's a common thing that IE does all you need to do is apply
display: inline; to the element that's giving you double margins

Icy Penguin
March 19th, 2007, 01:23 AM
I have no idea how this ended up in a new thread - sorry. :D

simplistik
March 19th, 2007, 08:00 AM
I have no idea how this ended up in a new thread - sorry. :D

I moved it to a thread of it's own...