Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Float and gaps hmm...

Status
Not open for further replies.

gwar2k1

Programmer
Apr 17, 2003
387
GB
Im using FLOAT to have tables next to each other. None of the tables have borders, cell spacing or padding but there is a little bit of white space inbetween them (its about 5px).

One table has float: left, the other doesnt have any float property: just an ordinary table

Can anyone explain this oddity please?

TIA

~*Gwar3k1*~
"To the pressure, everything's just like: an illusion. I'll be losing you before long..."
 
Post the table code.

If the tables are always going to be right next to each other, why separate them in the first place? Just put the <table> of table #2 right after the </table> of #1. No spaces, no line returns, no little girl scouts. Just rightnexttoeachother.

Cheers,


[monkey] Edward [monkey]

&quot;Cut a hole in the door. Hang a flap. Criminy, why didn't I think of this earlier?!&quot; -- inventor of the cat door
 
a) it doesnt work
b) its dirty code

~*Gwar3k1*~
&quot;To the pressure, everything's just like: an illusion. I'll be losing you before long...&quot;
 
any one?

~*Gwar3k1*~
&quot;To the pressure, everything's just like: an illusion. I'll be losing you before long...&quot;
 
Ooh Edward, I love it when you code dirty...

Here's another way to get two tables next to eachother:
[tt]
<html>
<head>
<title>Test Page</title>
</head>
<body>
<table style=&quot;display:inline; background:red;&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;>
<tr><td>Table 1</td></tr>
</table>

<table style=&quot;display:inline; background:green;&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;>
<tr><td>Table 2</td></tr>
</table>
</body>
</html>
[/tt]
It works fine on IE6, for safety on other browsers you might need to remove the spaces/line breaks between </table> and <table ... >, however dirty that might be.

-- Chris Hunt
Extra Connections Ltd

The real world's OK for a visit, but you wouldn't want to LIVE there!
 
Good man! cheerz


~*Gwar3k1*~
&quot;To the pressure, everything's just like: an illusion. I'll be losing you before long...&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top