Solved

table question

Posted on 2002-04-05
9
132 Views
Last Modified: 2010-04-09
if I have an image in a table tag like so:

<table border=0 cellspacing=0 cellpadding=0>
  <tr>
    <td><img src="myimage.gif">
    </td>
  </tr>
  <tr>
    <td><img src="myimage.gif">
    </tD>
  </tr>
</table>

there is always about a 2 pixel space between the first image and the 2nd image ... is there a way I can get those images to completely connect like if i did this:

<img src="myimage.gif"><br>
<img src="myimage.gif">

i've looked in style tags and things like that and can't figure out anything .. any help?

thanks,
0
Comment
Question by:SeanGraflund
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 19

Accepted Solution

by:
webwoman earned 50 total points
ID: 6920806
Take out the space before/after the td tags. Make sure you set border=0 on the images. Set the size of the images and the size of the table. The size of the table should equal the total of the image widths.

Just taking out extra spaces and making sure border on images is 0 should do it, though. And make sure that there's not any border on the actual graphic.
0
 
LVL 18

Expert Comment

by:bruno
ID: 6920886
in other words...





<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><img src="myimage.gif" border="0"></td>
  </tr>
  <tr>
    <td><img src="myimage.gif" border="0"></td>
  </tr>
</table>
0
 
LVL 1

Expert Comment

by:GorGor1
ID: 6922272
Like the other guys have said, the carriage return before the </td> is what is giving you the space.  I ran into this when I first started with tables and it drove me NUTS until I figured it out.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 11

Expert Comment

by:mouatts
ID: 6923302
You are still likely to get a one pixel gap in Netscape. One of its many one pixel bugs.

Steve
0
 
LVL 19

Expert Comment

by:webwoman
ID: 6923410
You shouldn't. If you did, none of the slicing tools from the graphics programs would work. They work just fine, with no gaps in either IE or Netscape.

FRAMES can give you gaps. Not tables. Not if they're set up right.
0
 
LVL 1

Expert Comment

by:GorGor1
ID: 6923485
WW is right.  But then she already knows she is.  If you leave no space between your table data and the closing </td>, you will get NO pixel gap.  I've made tables that would definitely not turn out right if there was 1 pixel gap at the end of each cell and they worked fine in netscrap.
0
 
LVL 1

Author Comment

by:SeanGraflund
ID: 6925097
thanks webwoman!

i've been working on this problem for over a day and couldn't figure it out! ..

amazing how simple the solution was!

Sean
0
 
LVL 19

Expert Comment

by:webwoman
ID: 6926778
Well, next time you'll know! We all fight with tables. I've probably made every mistake you can with them at least a dozen times. And that's just today. ;-)

Thanks for the A!
0
 
LVL 1

Expert Comment

by:GorGor1
ID: 6926812
and now you know...and knowing is half the battle :o)~
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question