View Full Version : IE doubling padding value

02-04-2004, 04:06 AM
I've recently come across an issue where internet explorer is doubling the padding value of a <div>. The odd thing is that this only happens in one of the many instances I use padding.

The site is at http://www.nd.edu/~mking5/theshow/ and the padding issue has to do with the space between the line dividing the sub navigation and the first heading of the right-hand column (directly above where it says "Bands Are Posted"). If you look at the page in Mozilla or Opera (I use v7), the space should be 10px, but in IE6 it appears to be 20px.

I originally thought IE was just starting out with 10px of space and it was really only adding another 10px. But if I set the padding-top value to 0, both IE and Mozilla (and opera for that matter) start from the same position.

I've tested this problem with all sorts of values and IE always doubles them (except 0, of course). I don't know if anyone has experienced this problem before?

CSS can be found at http://www.nd.edu/~mking5/theshow/style.css . The div I add padding to is #content.

edit: Oh yeah, thanks for ignoring the slightly ugly code! :p

Paul Jr
02-04-2004, 04:40 AM
padding: 0; added to your h2 styles along with the already present margin: 0; should do it. (If not... I'll have to take a better look :D )

02-04-2004, 04:54 AM
I thought this as well, and tried it, but to no avail. I would think it has to be something simple in nature like that though, I mean, would IE really render a mysterious extra 100% onto a certain padding value?

Thanks for the attempt though!

Paul Jr
02-04-2004, 05:10 AM
Aaahhh! *Tears his hair out* Blah, stupid me. Lol, I'll have to take a closer look. :D

02-04-2004, 06:26 AM
Merely as a test, try setting your padding using a selector which IE does not recognise....
something like

html>body>#content {..........}

I don't think this is the one that will do it, but find one, (or wait for someone to post it) and try that.
If it still does it, then something is cursed :D

02-05-2004, 12:51 AM

Good call, I didn't even think about using child selectors to make IE ignore the statement. It works like a charm.

Though, I still feel like this isn't really something that requires a "hack" of sorts. I mean, it's only this one wierd instance. I will do some more research. Any one have any idea of what may be causing this?

02-05-2004, 01:21 AM
Haven't read the tread in it's entirety, but these links could be something:


02-05-2004, 01:38 AM

Thanks a lot for the links. It seems my issue is described in your last link ( http://www.bosh.info/css/#bloated ). Apparently IE has a tendency to double the top padding of a div that uses clear:both to clear a float. This is precisely my situation. Unfortunatly though, I guess I still have to use a hack to get it the why I want it. It is IE after all...