Bob Sanders
Bob Sanders

Reputation: 51

Preventing HTML table from resizing overflow

I have searched for this for so long but no luck.

How can I prevent an html table from re-sizing when elements (other tables ) are inside of it I want the elements to overflow from the table when necessary.

 table-layout:fixed; 

The above does not work.

Upvotes: 2

Views: 7994

Answers (1)

dewyze
dewyze

Reputation: 979

I got this from here.

You can use:

td {
    max-width:30px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space: nowrap;
}

EDIT: Ellipsis is optional based on what you want to do with the text.

http://jsfiddle.net/7K9jE/1/

Upvotes: 1

Related Questions