470,624 Members | 2,246 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,624 developers. It's quick & easy.

cell alignment

I have a page with three pics which should be seemless, but no matter what style or in tag refinements I try to make the spaces remain. I know this is a popular topic, but all the suggestions I have seen do not work. here is the code.

border-collapse: collapse;

<table name="star" width="100%" class="borow" >
<td HSPACE=0 CELLSPACING="0"><image src="ltskbar.gif" border="0" hspace = "0" vspace = "0"></td><td><image src="mtskbar.gif"></td><td><img src="rtskbar.gif"></td>

There was a suggestion(several) where removing the white space was a possible fix, but as you can see, I omited any space and now my code is running together.

Thanks in advance for any help.

Trey Melton
Dec 6 '06 #1
2 2285
7,435 Expert 4TB
There is no such thing, in CSS, as the following:

In addition, your closing bracket is facing the wrong way.

Validate your code to find all your errors.
Dec 6 '06 #2
You are on the right track, just in the wrong spot. When working with tables it is important to define all the possible attributes. If you omitt any of the basic attributes a browser will make certain assumptions when rendering the table.

If you want images in adjacent cells to appear seamless you need to have the following in your table tag:

<table cellpadding="0" cellspacing="0" border="0">

Without the cellpadding and cellspacing attributes defined most browsers I'm familiar with will insert space between the cells by default, thereby giving you spaces between your images.

I would also define the height and width of each image within the img tag:

<img src="myimage.gif width="XX" height="XX" border="0">

I always add the border="0" in an image for the same reason I use the attributes in the table tag. If you don't define these things some browsers may make assumptions that result in an unintended display.

Take out all of the .css and try this to see if your images align correctly. Then, if you want to use .css for positioning or other purposes add it back in a bit at a time, checking the results after each addition to make sure the coding is working properly.
Dec 6 '06 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by harry | last post: by
3 posts views Thread by Dionísio Monteiro | last post: by
1 post views Thread by Chumley Walrus | last post: by
3 posts views Thread by Mad Scientist Jr | last post: by
4 posts views Thread by Doug Bell | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.