Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / HTML, CSS, Scripts / CSS / February 2008



Tip: Looking for answers? Try searching our database.

absolutely no gap between table rows?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
paulj - 25 Feb 2008 23:04 GMT
Hi,

Is it possible to have absolutely no gap between table rows?
ie in the following table I would like the bottom of the contents of
the 1st row to be virtually touching the top of the contents of the
2nd row.
I have tried various permutations of border-spacing and padding of 0,
but there always remains a pretty large gap.

Thanks
Paul

This is the HTML markup

<html>
<head>
<title></title>

<style type="text/css">
/* I have left these in as placeholders */
table {   }
td { }
tr {  }
</style>

</head>

<body>
<table>
 <tr>
     <td>1</td>
     <td>2</td>
     <td>3</td>
     <td>4</td>
 </tr>

 <tr>
     <td>5</td>
     <td>6</td>
     <td>7</td>
     <td>8</td>
 </tr>
</table>
</body>
</html>
Ian Hobson - 25 Feb 2008 23:11 GMT
> Hi,
>
> Is it possible to have absolutely no gap between table rows?
I believe it is.

Start with a doctype so your not in quirks mode, and put up a url.

Then we can see whats going on.
paulj - 25 Feb 2008 23:41 GMT
> > Hi,
>
[quoted text clipped - 5 lines]
>
> Then we can see whats going on.

Ian
Thanks for your reply - I've added a doctype (it is now W3C Valid HTML
4.01 Strict).
I don't have access to my own URL at the moment so I hope this is
enough.
Paul

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/
TR/html4/strict.dtd">
<html>

<head>

<title></title>
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">

<style type="text/css">

/* I have left these in as placeholders */
body { }
table {   }
td { }
tr {  }

</style>

</head>
<body>

<table>
 <tr>
     <td>1</td>
     <td>2</td>
     <td>3</td>
     <td>4</td>
 </tr>

 <tr>
     <td>5</td>
     <td>6</td>
     <td>7</td>
     <td>8</td>
 </tr>
</table>

</body>
</html>
Nik Coughlin - 26 Feb 2008 00:26 GMT
>> > Hi,
>>
>> > Is it possible to have absolutely no gap between table rows?

table {
 border-collapse: collapse;
}
paulj - 26 Feb 2008 01:09 GMT
> >> > Hi,
>
[quoted text clipped - 4 lines]
>
> }

Nick
Thanks for your reply but this still leaves a pretty large gap between
the rows (unless I am doing something very wrong).
Paul
Jonathan N. Little - 26 Feb 2008 01:50 GMT
>> "paulj" <mni...@googlemail.com> wrote in message

>> table {
>>   border-collapse: collapse;
>>
>> }

> Thanks for your reply but this still leaves a pretty large gap between
> the rows (unless I am doing something very wrong).

Most likely, but who can tell, you have not supplied us a link to your
attempt.

Signature

Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

rf - 26 Feb 2008 01:56 GMT
>> >> > Hi,
>>
[quoted text clipped - 8 lines]
> Thanks for your reply but this still leaves a pretty large gap between
> the rows (unless I am doing something very wrong).

There is no gap between the rows. You may be perceiving the space above and
below the content (the numbers). This is simply the normal way text is layed
out. If you want to change that then you should fiddle with line-height,
probably on the <td>:
td {line-height: .8em}
but why do you want to do this anyway?

Signature

Richard.

paulj - 26 Feb 2008 02:23 GMT
> >> "paulj" <mni...@googlemail.com> wrote in message
>
[quoted text clipped - 22 lines]
> --
> Richard.

Thanks to all who responded.

rf - yes, it was solved by line-height (I guess the other respondents
knew that but I seemed to be asking for something different :-)
Petr Vileta - 26 Feb 2008 02:11 GMT
>>>>> Hi,
>>
[quoted text clipped - 9 lines]
> the rows (unless I am doing something very wrong).
> Paul
Maybe this can help you

tr {margin: 0; padding: 0;}
td {margin: 0; padding: 0 5 0 5;}
Signature

Petr Vileta, Czech republic
(My server rejects all messages from Yahoo and Hotmail. Send me your
mail from another non-spammer site please.)

Please reply to <petr AT practisoft DOT cz>

John Hosking - 26 Feb 2008 02:47 GMT
>>> table {
>>>   border-collapse: collapse;
>>> }

>> Thanks for your reply but this still leaves a pretty large gap between
>> the rows (unless I am doing something very wrong).

> Maybe this can help you
>
> tr {margin: 0; padding: 0;}
> td {margin: 0; padding: 0 5 0 5;}

5 whats?

Units are required for non-zero values.

Signature

John
Although the OP seems satisfied already.

Petr Vileta - 26 Feb 2008 13:29 GMT
>>>> table {
>>>>   border-collapse: collapse;
[quoted text clipped - 11 lines]
>
> Units are required for non-zero values.
Of course, this is example only ;-) 5 units what author used. Somebody prefer
em, other pt or px.
Signature

Petr Vileta, Czech republic
(My server rejects all messages from Yahoo and Hotmail. Send me your
mail from another non-spammer site please.)

Please reply to <petr AT practisoft DOT cz>

Gregor Kofler - 26 Feb 2008 09:22 GMT
Petr Vileta meinte:

>>>>>> Hi,
>>>
[quoted text clipped - 13 lines]
> tr {margin: 0; padding: 0;}
> td {margin: 0; padding: 0 5 0 5;}

td and tr don't know "margin". tr doesn't know "padding". [1]

Gregor

[1]
http://www.w3.org/TR/CSS21/propidx.html

Signature

http://photo.gregorkofler.at ::: Landschafts- und Reisefotografie
http://web.gregorkofler.com  ::: meine JS-Spielwiese
http://www.image2d.com       ::: Bildagentur für den alpinen Raum

Petr Vileta - 26 Feb 2008 13:36 GMT
> Petr Vileta meinte:
>> Maybe this can help you
[quoted text clipped - 6 lines]
> [1]
> http://www.w3.org/TR/CSS21/propidx.html
Yes, but I don't know if author use css2.1 or css2.0 and don't know too if all
browser really know about w3c reccomendation :-) Sometime is better to write
needless rule instead of not write this absurd rule ;-)
Signature

Petr Vileta, Czech republic
(My server rejects all messages from Yahoo and Hotmail. Send me your
mail from another non-spammer site please.)

Please reply to <petr AT practisoft DOT cz>

Bergamot - 26 Feb 2008 19:21 GMT
> Yes, but I don't know if author use css2.1 or css2.0

It matters not what the author intended, since browsers don't make any
distinction. In reality, CSS 2.1 is the only one supported these days,
with a few 3.0 things thrown in here and there.

Mac IE5 is the only browser I know of that supports 2.0 instead of 2.1,
and it's a dead browser. Anything older than MacIE isn't worth sweating
over, either.

> and don't know too if all
> browser really know about w3c reccomendation

No browser has 100% support but all the major browsers have at least
pretty good support. If a browser doesn't grok the 2.1 specs, unless
it's something obscure you can bet money the user already knows they
have a deficient browser and has learned to suffer with it, or work
around it.

Signature

Berg

Petr Vileta - 27 Feb 2008 00:47 GMT
>> and don't know too if all
>> browser really know about w3c reccomendation
[quoted text clipped - 4 lines]
> have a deficient browser and has learned to suffer with it, or work
> around it.
I'm using IE6. I patched it by all updates provided by MS but I'm not sure if
this browser really apply all css rules right. I not need to upgrade to IE7
because this browser is user unfriendly and I'm not the only who have the same
opinoin of IE7 ;-)
Signature

Petr Vileta, Czech republic
(My server rejects all messages from Yahoo and Hotmail. Send me your
mail from another non-spammer site please.)

Please reply to <petr AT practisoft DOT cz>

dorayme - 27 Feb 2008 01:26 GMT
> >> and don't know too if all
> >> browser really know about w3c reccomendation
[quoted text clipped - 9 lines]
> same
> opinoin of IE7 ;-)

If you are wondering about issues to do with making website
pages, it is not relevant what any particular one of us uses or
what we think of what we use or what we might have done to the
browser personally. I use IE very rarely. And when I do, I eat a
little corner of it if I am hungry. But this still does not
influence how I make a web page. The only thing that I worry
about in general is have I made any silly mistake that Bergamot
would see instantly. It is a galvanizing idea.

Signature

dorayme

Petr Vileta - 28 Feb 2008 01:06 GMT
> If you are wondering about issues to do with making website
> pages, it is not relevant what any particular one of us uses or
[quoted text clipped - 4 lines]
> about in general is have I made any silly mistake that Bergamot
> would see instantly. It is a galvanizing idea.
Maybe you will agree with me that is important for who is pages designed for.

When 90% of supposed visitors will be Windows users (say pages about Windows
tricks) then is not important "damaged look" in Opera, Firefox etc., but look
in IE6/7 could be doing in "pixel resolution".

When pages is designed for general public (say bank application, blog,
internet portal etc.) then graphic look must compromise with page content and
relativelly the same look in all browsers.

When pages are designed for Linux users only then look is very unimportant
/linux users haven't aestetic taste ;-)/ and you can ignore IE browsers
existence too.
Signature

Petr Vileta, Czech republic
(My server rejects all messages from Yahoo and Hotmail. Send me your
mail from another non-spammer site please.)

Please reply to <petr AT practisoft DOT cz>

Andy Dingley - 28 Feb 2008 01:48 GMT
> Maybe you will agree with me that is important for who is pages designed for.

It isn't, because we don't get to choose who views them, or how they
choose to do it. We must serve everyone.

Assuming the "www" in this newsgroup name, and that we don't choose to
start browser-sniffing.
dorayme - 28 Feb 2008 02:12 GMT
> > If you are wondering about issues to do with making website
> > pages, it is not relevant what any particular one of us uses or
> > what we think of what we use or what we might have done to the
> > browser personally. I use IE very rarely.

> Maybe you will agree with me that is important for who is pages designed for.

I agree that if you know who your visitors will be, and if you
want them to be well served, you will design for them.

> When 90% of supposed visitors will be Windows users (say pages about Windows
> tricks) then is not important "damaged look" in Opera, Firefox etc., but look
> in IE6/7 could be doing in "pixel resolution".

When I am away from my office, unsurprisingly, I cannot always
use a Mac. I have to suffer on Winboxes elsewhere. I often find I
am looking things up to do with Macs. I would be displeased to
see a webpage horribly broken on the machine I happened to be on
at the time just because it was about Macs and I was on Windows.

Just btw or not, 10% can be an awful lot of people. You would
know it if they tried to hunt you down and kill you. I know I
hate being chased by bloodthirsty mobs for doing very little to
provoke them.

> When pages is designed for general public (say bank application, blog,
> internet portal etc.) then graphic look must compromise with page content and
[quoted text clipped - 3 lines]
> /linux users haven't aestetic taste ;-)/ and you can ignore IE browsers
> existence too.

I know what you mean, but I wonder if a field study would back
you up. I now and then come across Linux and Windows users with
some sense of taste. But that is just one lone visitor to the
planet, not much to go on statistically. <g>

Signature

dorayme

Jonathan N. Little - 27 Feb 2008 02:14 GMT
>>> and don't know too if all
>>> browser really know about w3c reccomendation
[quoted text clipped - 6 lines]
> I'm using IE6. I patched it by all updates provided by MS but I'm not
> sure if this browser really apply all css rules right.

Not hardly. IE7 better, but far from perfect and compared to other
browsers quite inferior.

> I not need to
> upgrade to IE7 because this browser is user unfriendly and I'm not the
> only who have the same opinoin of IE7 ;-)

Neither should be your design tool.

Signature

Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.