Am I misunderstanding the CSS specifications or is Firefox (version 1.0.6)
(and Opera) doing the wrong thing?
It appears that Firefox 1.0.6 includes the border in width calculations
for tables but not in height calculations.
Oh, and Opera version 8.02 does the same thing.
|<-->| |<-->| <------ border
|<------------>| <------ table contents
|<---------------------->| <------ width as rendered by Firefox
(*includes* border)
(it should be the width of the
contents, shouldn't it?)
+------------------------+ -----
| | <--- border
| +--------------+ | -----
| | | | ^
| | | | | <--- contents and height
| | | | v (height excludes border)
| +--------------+ | -----
| | <--- border
+------------------------+ -----
I can get a table I want to render correctly without specifying a height
and width but, in that case, the table's border is initially too small and
then redrawn with an ever-increasing size as rows are read from the HTML
and only reaches the correct size when the table is entirely read. (The
actual table is *much* larger than the example one, 32 rows and columns
with the height and width dynamically adjusted with JavaScript so only
some (9 rows and 9 columns) are visible at any given time.) I wanted to
specify the size of the visible part of the table at the start so the
border could immediately be drawn at the right size.
A portion of the HTML for an example 6-column, 2-row table with images:
....
....
<h2>No height and width specified</h2>
<table style="border:32px ridge #50C040;font-size: 0px; padding: 0" cellspacing="1">
....
....
<h2>Height = 127px; width = 431px</h2>
<h3>(Height = 2 * image height + 1; Width = 6 * image width + 5)</h3>
<p>The table should be the same as above -- but isn't.</p>
<table style="border:32px ridge #50C040;font-size: 0px; padding: 0; height: 127px; width: 431px" cellspacing="1">
....
....
<h2>Height = 127px; width = 495px</h2>
<h3>(Height = 2 * image height + 1; Width = 6 * image width + 5 + 64)</h3>
<p>Adding twice the width of the border to the width seems to correct the size problem
but the border size should not have had any influence on the size of the content area
of the table.</p>
<table style="border:32px ridge #50C040;font-size: 0px; padding: 0; height: 127px; width: 495px" cellspacing="1">
....
....
However, Firefox's treatment of a width specifier (but not the height
specifier) seems to counter-intuitively include the border. The complete
example file (6KB):
http://www.chebucto.ns.ca/~af380/Tab...idthError.html
The first table lacks height and width for the overall table style,
the second has the width I *thought* I should use and gets rendered too
small and the third table gets rendered the size I want but I don't
think Firefox or Opera are really doing the right thing.
So, am I wrong or are both Firefox and Opera wrong?
--
``Why don't you find a more appropiate newsgroup to post this tripe into?
This is a meeting place for a totally differnt kind of "vision impairment".
Catch my drift?'' -- "jim" in alt.disability.blind.social regarding an
off-topic religious/political post, March 28, 2005