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

How to eliminate spaces between graphics?

Status
Not open for further replies.

mc3

Programmer
Mar 11, 2002
14
0
0
US
I have pieces of sliced and diced graphics that I am piecing together, but I can't seem to eliminate some space between the pieces when fitting them back together. I need the pieces to fit together seemlessly.

There is a simple solution for this? Yes?

Thanks in advance

mc3
 
There are literally quite a few reasons why this is happening. The easiest way is to look at your page. Failing that:

look at the horizontal or vertical spacing on the images;

Check to see if the code for the images is not separated by a non breaking space;

If the images are in separate cells of a table check every other cell above and below to see if you have any other width items affecting the table;

Make sure you haven't sliced the image with an extra little bit of whitespace;

Lookout for the ubiquitous "shim"s added by fireworks/dreamweaver. There are always more than you think, so make sure you haven't inadvertantly copied one between the images Derren
[Mediocre talent - spread really thin]
 
Hi - this code placed in the body of your page would create a seamless square of 4 jpg's

<table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;>
<tr>
<td><img src=&quot;pic1.jpg&quot; height=&quot;50&quot; width=&quot;50&quot;></td>
<td><img src=&quot;pic2.jpg&quot; height=&quot;50&quot; width=&quot;50&quot;></td>
</tr>
<tr>
<td><img src=&quot;pic3.jpg&quot; height=&quot;50&quot; width=&quot;50&quot;></td>
<td><img src=&quot;pic4.jpg&quot; height=&quot;50&quot; width=&quot;50&quot;></td>
</tr>
</table>

hope this helps->okeddy
 
Thanks all

helps to get down to the code level

mc3
 
Always make sure you have your </td> tags on the same line as your content (ie the code above is how table cells should look) - don't make your code look lik this:

<td>
some content here followed by a carriage return
</td>

Although browsers aren't supposed to take any notice of white space within html code, when it comes to <td> tags they often do and you get extra space that you don't want!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top