Reputation: 3146
I need to make table td so it cannot enlarge. It should be square and height fixed and if there is more text then can contain a box it should stay as is and the text just go down. Hot to do that?
Upvotes: 0
Views: 168
Reputation: 9472
See Set the table column width constant regardless of the amount of text in its cells?
table-layout: fixed;
Here is a jsfiddle that has some HTML changes as well as CSS changes: http://jsfiddle.net/GR4Lm/
I removed some rows to simplify things, but the same technique would apply--wrap all TD contents in a single DIV.
Upvotes: 1
Reputation: 21050
I think may do what you're looking for: http://jsfiddle.net/rVDQm/
table tr td {
width:400px;
height:400px;
background:#ccc;
overflow:scroll;
overflow-x:hidden;
display:block;
}
Upvotes: 0
Reputation: 114447
Add a DIV in each TD and add overflow:hidden
for that element's style and give it fixed dimensions.
Upvotes: 0
Reputation: 1064
Assuming I understand your question correctly, use max-height
and max-width
in your CSS.
Upvotes: 0