Browser Differences With Table Attributes

  • Thread starter X l e c t r i c
  • Start date
X

X l e c t r i c

I did this page, to post at a webtv news group, to show what happens
when we do and do not specify values for table attributes.

http://www.xlectric.com/info/html/tabatt.html

When I viewed it on my PC I noticed that with some of the browsers there
is still some space at the bottom of the tables even when specifying
values of 0 (zero) for cellpadding and cellspacing.

I explain myself at the bottom of the page. Is there something that can
be done to eliminate that space, or is that simply the way it is ?

Art
 
R

Rik

X l e c t r i c said:
I did this page, to post at a webtv news group, to show what happens
when we do and do not specify values for table attributes.

http://www.xlectric.com/info/html/tabatt.html

When I viewed it on my PC I noticed that with some of the browsers there
is still some space at the bottom of the tables even when specifying
values of 0 (zero) for cellpadding and cellspacing.

I explain myself at the bottom of the page. Is there something that can
be done to eliminate that space, or is that simply the way it is ?

Hmmz, I'm not the one to explain in depth the reasons why, as I'm really
not qualified to do so, but this works in Opera:
td img{vertical-align:bottom;}

Floating the images would also work. It has something to do with how
inline images are placed on a line. Anyone with more to the point
knowledge care to elaborate?
 
J

Jonathan N. Little

X said:
I did this page, to post at a webtv news group, to show what happens
when we do and do not specify values for table attributes.

http://www.xlectric.com/info/html/tabatt.html

When I viewed it on my PC I noticed that with some of the browsers there
is still some space at the bottom of the tables even when specifying
values of 0 (zero) for cellpadding and cellspacing.

I explain myself at the bottom of the page. Is there something that can
be done to eliminate that space, or is that simply the way it is ?

First of all none of those attributes are needed, much better to control
presentation with CSS:

http://www.w3.org/TR/CSS21/tables.html

And with respect to WebTV it will bork the presentation of your page
regardless of what you do!
 
B

Ben C

Hmmz, I'm not the one to explain in depth the reasons why, as I'm really
not qualified to do so, but this works in Opera:
td img{vertical-align:bottom;}

Floating the images would also work. It has something to do with how
inline images are placed on a line. Anyone with more to the point
knowledge care to elaborate?

Sounds like that's the one.

An <img> is inline and has vertical-align: baseline by default, so it
sits on the baseline, which means a gap underneath it for descenders in
the current font (tails of letters like g, y).

Firefox does a quirks-mode switch on this one. If you don't give it the
strict doctype, computed line height for a line containing only images
is the height of the highest image, which is aligned to the bottom of
the line box.

img {display: block;} is sometimes another solution.
 
?

=?ISO-8859-1?Q?G=E9rard_Talbot?=

X l e c t r i c wrote :
I did this page, to post at a webtv news group, to show what happens
when we do and do not specify values for table attributes.

http://www.xlectric.com/info/html/tabatt.html

When I viewed it on my PC I noticed that with some of the browsers there
is still some space at the bottom of the tables even when specifying
values of 0 (zero) for cellpadding and cellspacing.

Images are inline elements, just like text. And inline-element must have
sufficient space for character descenders (j, p, q, g, y).

I explain myself at the bottom of the page. Is there something that can
be done to eliminate that space, or is that simply the way it is ?

Art

Everything is rather well explained at:

Images, Tables, and Mysterious Gaps
http://developer.mozilla.org/en/docs/Images,_Tables,_and_Mysterious_Gaps

Gérard
 
X

X l e c t r i c

I remember bork. Is he still hanging out with bindy ?

Thank you very much for the replies and solutions. They all worked. That
Mozilla page is great.

I updated my page and did a follow up post at the webtv news group.

Once again, thanks.

Art
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top