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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help - img is taking up too much space in table.

Status
Not open for further replies.

joelwenzel

Programmer
Jun 28, 2002
448
I have an image inside a table cell. Without the image, the cell is the right size. With the image, the cell is larger than the image vertically. Anyone know how to fix this?

cellpadding/cellspacing = 0
 
If the images is bigger than the TD that contains it, then it will "stretch" so that the image fits. Try specifying the width and height attributes in pixels in the IMG tag.
 
Resizing the image in a graphics program will not only make the image the correct size but it'll shave a little off the size the image is in terms of kbs too (so it will load faster).

If you just use html to resize an image your users will still be downloading the "real" size image so it makes sense to make the image the correct size in the first place.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top