LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-27-2004, 10:32 PM   #1
95se
Member
 
Registered: Apr 2002
Location: Windsor, ON, CA
Distribution: Ubuntu
Posts: 740

Rep: Reputation: 32
spaces between tables (HTML)


Ok, I wasn't quite sure where to put this.... I am trying to create a website and I am having the stupidest problem. For some reason in I.E. when using tables and putting images in them it will leave a space in between rows. I have cellpadding,spacing, and border all at 0. If I set the image hieght, and table height, and row/column heigh to the image size, it still leaves a space.
You can see the site here: http://www.jeness.org/cgi-bin/home.cgi
See how it has a space inbetween the first and second picture, and the bottom and middle one?
Is there a way to fix this?
(it looks fine in Firefox.)
 
Old 10-27-2004, 10:49 PM   #2
caged
Member
 
Registered: Jan 2004
Location: new zealand
Distribution: Mandrake,Slackware
Posts: 165

Rep: Reputation: 30
i to have had problems with that and i didnt bother fixing it in the end.

I can only suggest you look at the source html of some other peoples pages that have managed to do it.

im not sure but there may be a css way of doing it.

and i think but am prolly wrong that
there is less space inbetween the rows on a table that only has one cell per row so what may work is:

Code:
<table>
<tr>
 <td>
  <table>
   <tr>
    <td><img....>

  <table>
<tr>
 <td>
<tr>
 <td>
</table>
havent checked tho, sorry for any runaround.

ben.
 
Old 10-28-2004, 01:16 AM   #3
neilman
Member
 
Registered: Oct 2004
Location: Northville, MI
Distribution: Slackware
Posts: 65

Rep: Reputation: 15
Solution is here -- eliminate spaces before and after your <IMG> tags. So:
Code:
        <tr>
	  <td><img src="/pics/top.png"></td>
	</tr>
	<tr>
	  <td><img src="/pics/home-middle.png" usemap="#menubar" border=0></td>
	</tr>
	<tr>
	  <td><img src="/pics/bottom.png"></td>
	</tr>
In your attempt to make clean looking HTML, it was adding spaces before and after the <IMG> tags. Go ahead, and try it .. after the <td> and before the </td> eliminate all spaces.
 
Old 10-28-2004, 02:44 AM   #4
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Quote:
See how it has a space inbetween the first and second picture, and the bottom and middle one?
I don't see that, there's no space between the three images on my browser (Firefox).
 
Old 10-28-2004, 08:24 AM   #5
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 244Reputation: 244Reputation: 244
you could set css margin to zero to make sure, like :

<img src="/pics/top.png" style="margin:0;">
 
Old 10-28-2004, 08:36 AM   #6
neilman
Member
 
Registered: Oct 2004
Location: Northville, MI
Distribution: Slackware
Posts: 65

Rep: Reputation: 15
Quote:
Originally posted by jlliagre
I don't see that, there's no space between the three images on my browser (Firefox).
Yes, jlliagre, it's an MSIE only issue. Funny, eh?
 
Old 10-28-2004, 08:39 AM   #7
neilman
Member
 
Registered: Oct 2004
Location: Northville, MI
Distribution: Slackware
Posts: 65

Rep: Reputation: 15
Quote:
Originally posted by Cedrik
you could set css margin to zero to make sure, like :

<img src="/pics/top.png" style="margin:0;">
Actually, Cedrik, in MSIE, even with that CSS attribute, the spaces still show up. It really is the spaces between the <TD> and <IMG>, as well as after the <IMG> and before the </TD> tags that create that space in MSIE. Again, in Mozilla/Firefox/Thunderbird you will not see those spaces between the table rows.
 
Old 10-28-2004, 11:12 AM   #8
95se
Member
 
Registered: Apr 2002
Location: Windsor, ON, CA
Distribution: Ubuntu
Posts: 740

Original Poster
Rep: Reputation: 32
Omg neilman, ur the man! It worked perfectly... what a wierd issue, only in MSIE eh? Thanks a lot

And ya. I had tried the margin thing b4, neilman is right, it doesn't work.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
HTML: How do I insert empty spaces? Cyberian Programming 3 02-10-2005 09:06 AM
Remove white spaces in HTML files using shell : Possible???????? cpanelskindepot Programming 2 08-05-2004 11:14 PM
HTML+spaces+Windows Ctawp Programming 1 08-20-2003 01:57 PM
Completely unrelated question: HTML->Tables->Columns Ctawp Linux - Software 6 08-07-2003 12:31 PM
Html: Extra Spaces on Top mikeshn Programming 1 07-05-2003 03:40 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration