This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Stylesheets > November 2006 > firefox table captions





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author firefox table captions
Johnny

2006-11-05, 11:33 pm

In MSIE table captions are displayed at the same size as content. But
in Firefox the text displays at browser default, It also exceeds the
width of the table and the excess is hidden if the table is enclosed in

a bounding div.

If caption is given a font-size (eg 0.8em) with CSS text it displays
correctly, however MSIE then shows the text too small.


Is there any way of applying a font-size to firefox table caption text
while keeping the correct display in other browsers? And also of
preventing the caption width exceeding that of the table?

VK

2006-11-05, 11:33 pm

> In MSIE table captions are displayed at the same size as content. But
> in Firefox the text displays at browser default, It also exceeds the
> width of the table and the excess is hidden if the table is enclosed in


Gecko browsers (incliding Firefox) implement W3C table box model. In
this (rather weird) model <caption> and <table> are two separate
elements floating in an abstract "table frame" box which is not visible
and not DOM-accessible. That is despite the fact that you still have to
put <caption> inside <table> tag. There is a number of glitches caused
by this not-so-bright standard, see for instance
"table caption 1px jog"
<https://bugzilla.mozilla.org/show_bug.cgi?id=333643> - or your own
case.

You may try:

TABLE CAPTION {
font-size: 0.8em;

/* this will be parsed by IE only: */
font-size: expression("1em");
}

Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews