Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

General discussion

flush images and aligned top tables

Jul 27, 2005 3:50AM PDT

Hey I have two questions:

1) How do you make images flush with each other? When ever I put <image><br><image> there isalways a small gap between the images. Go to http://img164.imageshack.us/img164/1424/problem0ls.png to see what I mean. There is a gap between the two rectangles when there should be none.

2) When making a table the content in a cell is always verticaly aligned to center. Is there any way to change it to top?

Cheers

Discussion is locked

- Collapse -
2 Things
Jul 27, 2005 4:43AM PDT

1. Dont position images like that. the <br> tag is meant for page breaks. Thats why you see the gaps appearing. Instead use tables. If you need the cells to be flush, then you can just change it so that theres no cellpadding and no cellspacing.

2. add valign=top to the <td> tag.

- Collapse -
question 1 Still doesn't work
Jul 27, 2005 7:12PM PDT

Here is the HTML:

<html>
<body>

<table border="0" cellpadding="0">
<tr>
<td><img src="frame top.bmp"></td>
<td valign=top><img src="frame right.bmp"></td>
</tr>
<tr>
<td><img src="frame left.bmp"></td>
<td></td>
</tr>
</table>

</body>
</html>

And here is the picture: http://img191.imageshack.us/img191/165/problem2pc.png

What's wrong? I know that the pictures themselves do not have any white space around them. I did the no cellpadding and border, so what's wrong.

PS. thanks for valign=top btw!

- Collapse -
(NT) (NT) Try <td border = ''0''> for each cell that contains an im
Jul 27, 2005 11:37PM PDT
- Collapse -
cellpadding
Jul 28, 2005 1:32AM PDT

by adding it as an image it's still under the cellpadding rule. If you added it as a background this wouldn't matter as much. Where you wrote cellspacing=0, add cellpadding="0" as well. That should fix everything.

- Collapse -
SORRY
Jul 28, 2005 1:34AM PDT

Sorry, i misread your post. My previous should have been add cellspacing=0 as well. Sorry again.

- Collapse -
thanks
Jul 28, 2005 1:52AM PDT

you are a saint. it works! whoever thought it would be so hard just to make two things touch?