Solved

table question

Posted on 2002-04-05
9
133 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
Technology Partners: 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

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

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

The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
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…

630 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