Welcome to WebmasterWorld Guest from 54.211.86.24

Forum Moderators: incrediBILL

Tables cells without overflow....

that don't go off the page

   
9:49 am on Oct 3, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



We only need this to work in IE5+ but I can't seem to manage it.

We have a dynamic table (width="100%") with any number of columns, each cell with potentially a long string. I don't want any of the cells to wrap their content - but the nowrap attribute and <nobr> force the table column to expand to the length of the string which, in some cases, takes the edge of the table off screen. Basically I want the table to size normally and the cell content to *chop* if it's too big.

I could use <div> tags with no overflow but to do this I need to state the explicit size of the column; which I can't because there could be any number of columns.

Any ideas - if there is an answer I'm sure it must lie in CSS but I can't find it.

9:59 am on Oct 3, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Bingo!

style="table-layout:fixed" seems to work quite well... Just found this page has a detailed description of CSS2s table layout controls: [webreview.com...]

 

Featured Threads

My Threads

Hot Threads This Week

Hot Threads This Month