[thelist] Navigator 100% table

rudy r937 at interlog.com
Thu Oct 18 15:15:01 CDT 2001


> I have a table.  This table has one row, two data elements.
> The first TD is fixed at 180, the second is set to 100%
> to take up the rest of the table.

hi adam

that could be your problem right there   ;o)

you're running up against the "logic" of widths

what is the 100% supposed to be a hundred percent of?

the row?  the cell?  the remaining space in the cell?

any time you use percentages, you have to step back and ask that question

by the way, browsers don't necessarily calculate widths for cells from left
to right, so the concept of "remaining" space is a bit fuzzy

and if you really mean 180 + 100% then the row would be wider than the
table, right?

sigh

> Inside the 100% TD I have another table with a general width of 100%
> specified.  This is so as wide as the TD goes, the table in it will
stretch
> to that width.  Sounds fine, right?

yeah, table width=100% for a nested table is usually safe

it does nothing, however, to alleviate the problem the browser has in
assigning a width to that 100% cell

> Works in IE beautifully.

bad news -- in win95 ie5 at 800x600 there's a horizontal scrollbar,
although it looks like the page is only a few pixels too wide

if you've read aardvark's liquid design article, you may also want to
follow the link he included to my liquid tables article
(http://evolt.org/article/LiquidTables/20/2321/evolt.org) and review those
techniques

one thing i'd try is not to specify a width of any kind on your second
cell -- if it has sufficient content to wrap, the browser may just decide
to honour your request to make the first cell only 180

remember, widths are a recommendation to the browser, that's all, and the
browser has final say on how it will assign widths

furthermore, all browsers are different, so you gotta keep testing


by the way, in netscape 4, the white text in those boxes suddenly turns
black half way down the page, so you may want to double-check your code --
i *think* it's because you have <hr>'s embedded inside <p>'s, and the
browser is implicitly closing the first <p> and not applying a style to the
implicitly opened <p> after the <hr> (except it's not doing this
consistently either, so i'd just describe it as buggy)


rudy





More information about the thelist mailing list