Forum Moderators: open

Message Too Old, No Replies

How Can I Apply NOWRAP To The Entire Table?

How Can I Apply NOWRAP To The Entire Table?

         

JeffesonM

2:46 pm on Jul 16, 2004 (gmt 0)

10+ Year Member



I have a table that contains a very large amount of data. It extends far off the page so the user has to scroll horizontally, which I think is ugly but the users seem to be okay with.

Either way, I need for all of the cells in the table to be set not to wrap, so that each row in the table takes up the same amount of vertical space. Aside from actually putting NOWRAP on each and every TD tag, is there any way, via HTML or maybe even CSS, that I can apply this style to the entire table in one go?

BlobFisk

6:09 pm on Jul 16, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld, JeffersonM!

CSS is probably the best way to go here. In one fell swoop you can apply nowrapping to a table:

CSS: table.myTableClass td { white-space: nowrap; }

HTML: <table class="myTableClass">

You can apply this rule to all tables my not using a class:

CSS: * td { white-space: nowrap; }

HTH

JeffesonM

7:11 pm on Jul 16, 2004 (gmt 0)

10+ Year Member



Just what I was looking for... thanks a bunch!