SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Evangelist
    Join Date
    Jul 2004
    Location
    England
    Posts
    588
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unwanted space below dl in MSIE6

    Using a horizontal dl for a menu... in MSIE6 I'm getting approx 20-30px extra unwanted space beneath it. It doesn't happen in FF and Mac. Padding and margin are universally zeroed.

  2. #2
    Winemaster bronze trophy BonRouge's Avatar
    Join Date
    Oct 2004
    Location
    Sendai, Japan
    Posts
    2,417
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You really want to show us the page in question.

  3. #3
    SitePoint Evangelist
    Join Date
    Jul 2004
    Location
    England
    Posts
    588
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    A stripped-down example is at: http://glvr.com/test/2/

    Seems the dl is inheriting padding-top from the parent div.
    Last edited by gulliver; Aug 11, 2006 at 04:44.

  4. #4
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,481
    Mentioned
    182 Post(s)
    Tagged
    6 Thread(s)
    Hi gulliver,

    Does the element have "layout"? i.e. does it have a dimension.

    That would be the first thing to try as ie does not know how big an element is until it gets "layout" and gets all its boundaries wrong.

    Otherwise a litlle more code than the above would be needed lol

  5. #5
    SitePoint Evangelist
    Join Date
    Jul 2004
    Location
    England
    Posts
    588
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The parent, the dl and the dd are all floated - so I'd assumed they were treated as 'has layout' even though no dimension is set on the list.

    And, adding 'width: 100%' to the dl had no effect.

  6. #6
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,481
    Mentioned
    182 Post(s)
    Tagged
    6 Thread(s)
    Hi,

    As suspected its a "layout" issue and you need to add it here:
    Code:
    h2
    {
    clear: both;
    font-size: 140%;
    padding: 0; margin: 0;
    background: #eee;
    width:100%
    }
    The secret is working out where its needed

  7. #7
    SitePoint Evangelist
    Join Date
    Jul 2004
    Location
    England
    Posts
    588
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, Paul. Appreciated.

    Never come across that one before.

    ;-)


Bookmarks

Posting Permissions

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