Solved

table question

Posted on 2002-04-05
9
128 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
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
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

895 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now