Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Strict / Transitional DOCTYPES

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #22594
    jhallmusic
    Member

    OK… this is enough to make me go crazy. I’ve been dealing with a gap that is occurring between two images (used to create the top two parts of a background). Basically, if I’m using the strict DOCTYPE, and I put a break in between the two tags for the images, I get the small gap (in both IE 7 and Firefox). This makes sense to me, since I’m using a page wrap with width equal to the two images I’m using… so I’m guessing there’s one "space" there causing the gap. If I put the two tags in one line, with no space between them, the gap goes away in IE 7 but NOT in Firefox. If I change the DOCTYPE to transitional, I can get the gap to go away in both browsers, but obviously I’m trying to stay away from doing that. So.. what should I do?? Any thoughts or knowhow would be great. thanks! Here’s the code (as simple as it possibly could be):

    Code:




    Untitled 1

    top barParadise Coach Interiors


    Code:
    *{
    margin:0; padding:0;
    }

    html{
    overflow-y:scroll;
    }

    body{
    font: 62.5% Verdana, sans-serif;
    background: #000000;
    }

    #page_wrap{
    width: 891px;
    margin: 0 auto;
    }

    Hope this isn’t a dumb one.

    #47120
    jhallmusic
    Member

    The line break isn’t in there anymore, so that wasn’t doing it, but it was the line-height property. Thanks!

    #47121
    jhallmusic
    Member

    So I found out, in case anyone else runs across this problem, is that in standards-compliance mode, images are set to display as inline by default, which leaves a space underneath the image (the baseline underneath inline elements). Adding a img{display:block;} to your css will stop this from happening. Took me awhile to figure it out, and maybe it’s a no-brainer, but wanted to post my findings.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.