Take the 2-minute tour ×

how to stop the cells of a row from increasing in size when a cell within is larger then all.


the cell increases in size because a dynamic content is added at runtime

share|improve this question
the answers do not work...... –  user287745 Feb 5 '11 at 16:57
add comment

3 Answers

This should work:

table { width: 250px; table-layout: fixed; }
table tr { height: 1em;  }
td { overflow: hidden; white-space:nowrap;  }

Obviously, specify a width based on your layout. :)

About the max-width method, it only applies to block elements. <table> is neither block nor inline. However you could try setting it to be so with display: block;

share|improve this answer
add comment


what about using max-width css-property for your td's?

CSS max-width property @ W3Schools.com

share|improve this answer
add comment
up vote 0 down vote accepted

answer is you cannot, the only way would be to merge the cells...

share|improve this answer
add comment

Your Answer


