Re: Browser Differences With Table Attributes
- From: Ben C <spamspam@xxxxxxxxx>
- Date: Tue, 06 Mar 2007 17:26:16 -0600
On 2007-03-06, Rik <luiheidsgoeroe@xxxxxxxxxxx> wrote:
X l e c t r i c <Xlectric@xxxxxxxxx> 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.
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?
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.
.
- References:
- Browser Differences With Table Attributes
- From: X l e c t r i c
- Re: Browser Differences With Table Attributes
- From: Rik
- Browser Differences With Table Attributes
- Prev by Date: Re: Weird position movements between similar pages
- Next by Date: Re: Hi All,
- Previous by thread: Re: Browser Differences With Table Attributes
- Next by thread: Re: Browser Differences With Table Attributes
- Index(es):
Relevant Pages
|