Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Location
    Iowa / Notre Dame
    Posts
    538
    Thanks
    0
    Thanked 0 Times in 0 Posts

    IE doubling padding value

    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!
    My Site {Mike's Adventures}

    Yikes, forums are almost too much fun.

  • #2
    Regular Coder
    Join Date
    Dec 2003
    Location
    USA
    Posts
    230
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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 )

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Location
    Iowa / Notre Dame
    Posts
    538
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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!
    My Site {Mike's Adventures}

    Yikes, forums are almost too much fun.

  • #4
    Regular Coder
    Join Date
    Dec 2003
    Location
    USA
    Posts
    230
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Aaahhh! *Tears his hair out* Blah, stupid me. Lol, I'll have to take a closer look.

  • #5
    Senior Coder
    Join Date
    Oct 2003
    Location
    Australia
    Posts
    1,963
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Merely as a test, try setting your padding using a selector which IE does not recognise....
    something like
    Code:
    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

    I take no responsibility for the above nonsense.


    Left Justified

  • #6
    Regular Coder
    Join Date
    Jun 2002
    Location
    Iowa / Notre Dame
    Posts
    538
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Lemming,

    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?
    My Site {Mike's Adventures}

    Yikes, forums are almost too much fun.

  • #7
    Master Coder
    Join Date
    Feb 2003
    Location
    Umeå, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    liorean <[lio@wg]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards

  • #8
    Regular Coder
    Join Date
    Jun 2002
    Location
    Iowa / Notre Dame
    Posts
    538
    Thanks
    0
    Thanked 0 Times in 0 Posts
    liorean,

    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...
    My Site {Mike's Adventures}

    Yikes, forums are almost too much fun.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •