How to get rid of a 'gap' between 2 images on top of each other

J

Jack

Hello,

I have a table (<table>) with two table rows (<tr>), each row has a single
column (<td>). Each column has a single image (<img src="img1.png" /> <img
src="img2.png" /> but there is a gap between each of the images. How do i
force it with NO gap? I've tried many things using valign, border, etc. Can
anyone suggest what I'm doing wrong?

Jack.
 
E

Els

Jack said:
Hello,

I have a table (<table>) with two table rows (<tr>), each row has a single
column (<td>). Each column has a single image (<img src="img1.png" /> <img
src="img2.png" /> but there is a gap between each of the images. How do i
force it with NO gap? I've tried many things using valign, border, etc. Can
anyone suggest what I'm doing wrong?

Valid guesses need an example of course, but how about adding
td img{vertical-align:bottom;}
or
td img{display:block;}
to your stylesheet or styleblock?
 
J

Jukka K. Korpela

Jack said:
I have a table (<table>) with two table rows (<tr>), each row has a
single column (<td>).

You have a URL? Should we try to guess it from the disinformation you give on
the From line?

The odds are that you shouldn't be using a table, since you have no tabular
data. Symptoms of this: a table with very few cells, no <th> element, no
imaginable said:
Each column has a single image (<img src="img1.png"
/> <img src="img2.png" />

That's invalid markup to begin with. Besides, that's two images with a space
between them.
but there is a gap between each of the images.

There are at least 42 possible explanations. You can find them all in the
freely available HTML and CSS specifications, tutorials, FAQs, and
discussions on the net.
How do i force

You don't.
it with NO gap?

No, you don't force that either.
I've tried many things using valign, border, etc.

Apparently you didn't get desperate enough to read the manuals, though.
Trying one thing after another without any idea of what you are doing
is a way of digging deeper, not getting out of the hole.
Can anyone suggest what I'm doing wrong?

Pretty much everything.
 
T

Tina - AxisHOST, Inc.

Jack said:
Hello,

I have a table (<table>) with two table rows (<tr>), each row has a single
column (<td>). Each column has a single image (<img src="img1.png" /> <img
src="img2.png" /> but there is a gap between each of the images. How do i
force it with NO gap? I've tried many things using valign, border, etc.
Can anyone suggest what I'm doing wrong?


Try adding the following attributes: cellpadding="0" and cellspacing="0"
to your table tag. Also, make sure you have no spaces in your table data
areas.

--Tina
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top