Minimum table/cell size

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
[n00b]
Forum Commoner
Posts: 34
Joined: Sat Mar 20, 2004 7:06 pm

Minimum table/cell size

Post by [n00b] »

guys how can I set the minimum with for a table or cell? I set them to autostretch (100% width) but when the window size is small content looks weird so I need to put some minimum width.
Any help appreciated ;)
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Code: Select all

<td width="50">
however, you need to be careful which cells you mark as such..these cells are often the LAST ones to expand.. (50 pixels)

btw, these cells allow compaction, as long as they aren't nowraps or can't wrap in any way.
User avatar
no_memories
Forum Contributor
Posts: 145
Joined: Sun Feb 01, 2004 7:12 pm
Location: New York City

Post by no_memories »

min-width: 50px; css 2 rule is supported by Mozilla and Opera, and I believe Safari/Konquerer.

Also, you can put a <div> with a width set at a determined width so the cell won't shrink beyond the div's width.

Example:

<td width="100%">text and stuff here <!-- put the dive at the end of the content of the <td> --><div style="width: 50px;"></div></td>
Post Reply