Forum Moderators: not2easy

Message Too Old, No Replies

Text in columns of a table getting wrapped

         

PallaviK

10:15 pm on Apr 17, 2008 (gmt 0)

10+ Year Member



I have a table with about 20 columns...I applied scrollablecontainer class with below definition to make it scrollable.But the problem is even though the table is scrollable the text in some of the columns getting wrapped..

the css class i used to make the table scrollable is as shown below:
.scrollTableContainer {
overflow: scroll;
width: 750px;
margin: 15px 0 0 0;
position: relative;
}

Can anybody advise me the css property to applied to td so that the text within does not get wrapped.

Any kind of help is much appreciated.
Thanks,
Pallavi

Xapti

11:40 pm on Apr 17, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I sort of had the same sort of problem, although it may have been different, since I don't think I had it in a scrollable container, but to just let the default window scroll. Browsers have a fair bit of flexibility on how they should display tables, and one of the traits that they do, is try to shrink cells width to as small as possible so that it can fit in the container/browser window (which doesn't apply to you I suppose), and the other is that it can take up more space than it will be assigned, if that space is not sufficient. I think increasing your tablecontainer size may fix your problem, because 750px was not sufficient horizontal space. By the way, you should size the width in EMs so that it will still scale/scroll properly with smaller or larger text sizes.

swa66

11:45 pm on Apr 17, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



How's the table told it needs to be wide and it needs not to wrap content ? Browsers try to fit tables if left to themselves.