|
Posted by Jukka K. Korpela on 01/04/07 14:56
Scripsit admin@daytonalink.com:
> How can I get all of the rows in a table to have consistent heights?
Why should the heights be the same (which is probably what you mean by
"consistent")?
As usual, a URL would help us to guess what the real problem is.
> Rows with lots of content have larger heights than those with little.
As they should, should they not?
> I've used "table-layout:fixed" for consistent columns
That's for fixed layout, which is a different thing. You _can_ use it to
make columns have the same width, but it really depends on the data whether
that's a good idea.
> and was
> wondering if there was anything for consistent rows.
Well, what did you try? The obvious method is to set the height of tr
elements, e.g.
tr { height: 3em; }
Maybe you set the height too small. What did you expect to happen then -
vertical truncation? By CSS 2 spec, you cannot set the height of a table
cell smaller than the height required by its content, see
http://www.w3.org/TR/REC-CSS2/tables.html#height-layout
What you _can_ do is to wrap the contents of a cell in a div element and set
its height. By default, any overflowing content will then mix things up by
flowing over other cells or other elements on the page. So what do you
really want?
--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/
[Back to original message]
|