Forum Moderators: not2easy

Message Too Old, No Replies

pixel gap in between div tags

         

martin26

11:57 pm on Nov 24, 2007 (gmt 0)

10+ Year Member



Hello everybody.
I have a problem with a pixel gap showing in between two div tags in IE 7. Everything looks just in firefox.
Can't solve the issue by myself. Any suggestions how to get rid of the gap?

here the code:

<body>
<div id="container"><div id="header"><img src="../images/gold_header.jpg" alt="gold header" width="750" height="151" longdesc="transformer/images/gold_header.jpg" /></div>
<div id="linkbar"><table border="0" cellpadding="0" cellspacing="0" width="750">
<!-- fwtable fwsrc="linkbar.png" fwpage="Page 1" fwbase="linkbar.gif" fwstyle="Dreamweaver" fwdocid = "696007955" fwnested="0" -->
<tr>
<td><img src="spacer.gif" width="165" height="1" border="0" alt="" /></td>
<td><img src="spacer.gif" width="146" height="1" border="0" alt="" /></td>
<td><img src="spacer.gif" width="439" height="1" border="0" alt="" /></td>
<td><img src="spacer.gif" width="1" height="1" border="0" alt="" /></td>
</tr>
<tr>
<td><a href="manage_websites.php" target=""><img name="linkbar_r1_c1" src="images/linkbar_r1_c1.gif" width="165" height="25" border="0" id="linkbar_r1_c1" alt="Manage Websites" /></a></td>
<td><a href="logout.php" target=""><img name="linkbar_r1_c2" src="images/linkbar_r1_c2.gif" width="146" height="25" border="0" id="linkbar_r1_c2" alt="Logout" /></a></td>
<td><img name="linkbar_r1_c3" src="images/linkbar_r1_c3.gif" width="439" height="25" border="0" id="linkbar_r1_c3" alt="" /></td>
<td><img src="images/spacer.gif" width="1" height="25" border="0" alt="" /></td>
</tr>
</table></div>

encyclo

3:01 am on Nov 25, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld martin26! Is the problem related to a div which contains an image? If so, have you tried setting the
img
element as
display:block;
?

penders

11:28 am on Nov 25, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



...or set
vertical-align:bottom;
perhaps (on the IMG element)
[webmasterworld.com...]

Unrelated... the longdesc attribute on your IMG element should be a URL to a textual page that further describes the image, it shouldn't be another image itself - accessibility. W3C [w3.org]

martin26

4:19 pm on Nov 25, 2007 (gmt 0)

10+ Year Member



i tried "display: block" as well as "vertical align bottom". However there was no affect at all.

encyclo:
actually i am not sure if this problem is css or div related. i was just guessing. It would be nice if you could still help me out.
(do you suggest i move the post to a different section of the forum?)

penders:
thank you for the tip with the long desc tag. didn't know that. gone change that asap.

penders

6:19 pm on Nov 25, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



i tried "display: block" as well as "vertical align bottom".

On all your images?

The top row in your table is a 1px high spacer row... is this as intended? Is your spacer row higher than 1px?