- This topic is empty.
-
AuthorPosts
-
April 25, 2008 at 3:32 am #22594
jhallmusic
MemberOK… 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
Advertisement
Advertisement
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.
April 25, 2008 at 1:23 pm #47120jhallmusic
MemberThe line break isn’t in there anymore, so that wasn’t doing it, but it was the line-height property. Thanks!
April 25, 2008 at 1:48 pm #47121jhallmusic
MemberSo 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.
-
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.