Solved

table question

Posted on 2002-04-05
9
127 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
You are still likely to get a one pixel gap in Netscape. One of its many one pixel bugs.

Steve
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 19

Expert Comment

by:webwoman
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
and now you know...and knowing is half the battle :o)~
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
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…
The viewer will learn the basics of jQuery including how to code hide show and toggles. 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…

763 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

6 Experts available now in Live!

Get 1:1 Help Now