Fixing (permanently) the height of a table element

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
mjseaden
Forum Contributor
Posts: 458
Joined: Wed Mar 17, 2004 5:49 am

Fixing (permanently) the height of a table element

Post by mjseaden »

Hi All

Normally, when you set the height of a TD element, it remains at that height unless you get a text overflow, in which case it resizes to fit that text.

Is there any way I can truely fix the height of a TD, so that even if text in the cell does overflow, it still remains the same size?

Many thanks

Mark
TheBentinel.com
Forum Contributor
Posts: 282
Joined: Wed Mar 10, 2004 1:52 pm
Location: Columbus, Ohio

Re: Fixing (permanently) the height of a table element

Post by TheBentinel.com »

mjseaden wrote:Hi All

Normally, when you set the height of a TD element, it remains at that height unless you get a text overflow, in which case it resizes to fit that text.

Is there any way I can truely fix the height of a TD, so that even if text in the cell does overflow, it still remains the same size?

Many thanks

Mark
Sometimes style's seem to get more respect that height/width attributes. I don't know the syntax, but if you look into CSS and height/width, you can probably find what you're looking for.

something like

<tr style="height:95px">
Unipus
Forum Contributor
Posts: 409
Joined: Tue Aug 26, 2003 2:06 pm
Location: Los Angeles, CA

Post by Unipus »

toweter's correct. overflow: hidden or possibly overflow: auto is what you're looking for.
mjseaden
Forum Contributor
Posts: 458
Joined: Wed Mar 17, 2004 5:49 am

Post by mjseaden »

Thanks, I'll give it a go.
Post Reply