[SOLVED] Annoying gap below images in IE????

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Annoying gap below images in IE????

Post by Chris Corbyn »

Hi,

Does anyone know why I'm getting a transparent gap of about 4px underneath my images which is only visible in IE? I've tried setting margin, border and padding to 0px but still no luck.

Here's the code that's doing it.

Code: Select all

<table cellspacing="0" cellpadding="0" border="0"><td style="width:530px; height:3px; background-color:#328BCF"></td></table>
<div style="width:530px; height:25px; margin:0px; background-color: #EDEEEF">
<img src="img/auric_ac_title.gif">
</div>
That first table at the top is just to make a horizontal rule and my image dimensions are 300 x 25px.

You should be able to see the gap I mean at http://www.dur.ac.uk/c.a.corbyn/angela/?loc=index by looking at the title that says Auricular Acupuncture ||

Thanks in advance
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

It can be from the line breaks you have in the div there.. you may need to zero margin/padding for the image itself...
Draco_03
Forum Regular
Posts: 577
Joined: Fri Aug 15, 2003 12:25 pm
Location: Montreal, Canada

Post by Draco_03 »

Yep indeed just write instead

Code: Select all

<table cellspacing="0" cellpadding="0" border="0"><td style="width:530px; height:3px; background-color:#328BCF"></td></table><div style="width:530px; height:25px; margin:0px; background-color: #EDEEEF"><img src="img/auric_ac_title.gif"></div>
should work
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Thanks guys, it was the line breaks that were doing it. :-)
Post Reply