You are here: Re: table row heights « HTML « IT news, forums, messages
Re: table row heights

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/

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация