Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unwanted "gutter" with image in table cell

Status
Not open for further replies.

SteveDingle

Programmer
Jul 26, 2004
254
GB
Heya All,

I'm sure this is a beginer HTML question (I work with databases not much web stuff) so hopefuly will be easy.

Basically I have an button image I want to use for navigation. I am putting the inmage in a table cell...
Code:
<a href="downloads.html">
<img src="images/blank.gif"  alt="Downloads" border="0">
</a>

The table has cellpadding/spacing/border at 0.

The problem is that I am seeing a "gutter/space" at the bottom of the cell. I can tell as I have colored the cell Lime and can see a line (about 3-4 pixles hi). Have tried various other images and get the same effect. I assume I'm missing a attribute setting somewhere but just can't find it.

Thanks all
Steve
 
Try setting 0 margins and padding on the image itself.

Code:
<img style="margin:0;padding:0;" src="myImage.jpg">

Also.. try this if you still ahve the problem.

Remove all the line breaks in the code around where this problem is occuring.
There is a weird thing I see in IE from time to time where the line breaks in the code get rendered.

Can you show us the actual page or post the code here (use code tags to make it easier to read).

"I'm making time
 
Heya Foamcow,

Thanks for speedy response, the margin etc.. setting didn't help but....

" Remove all the line breaks in the code around where this problem is occuring. "

.. did.
Weird, doesn't help for readability but as long as I can now move forward!!! :)

Thanks again!


Steve Dingle
D&S Business Solutions Ltd
London, UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top