Board Logo

CSS word wrap help
markh - 8/27/2010 at 03:12 PM

I have a nice table working with PRO, I have a description field that is width 300px. I want the text to not wrap, and not overflow. But when I put this in the style sheet

.tabBodyCol2 {
font-family: tahoma, verdana, arial;
font-size: 12px;
text-align: center;
width: 300px;
overflow: hidden;
white-space:nowrap;
}

The width auto sets to the full description length. I want it to just cut off, the user will be able to click the row and open into a new window with a better veiw.

Any ideas?

Thanks in advance


markh - 8/27/2010 at 04:11 PM

Never mind I figured it out, just in case anyone else is looking for a fix here is what I did;


/* Main table */
.tabTable {
font: 12px tahoma, verdana, arial;
color: black;
width: 50%;
height: 300px;
overflow: hidden;
white-space:nowrap;
table-layout: fixed;
}



/* Cell of table body, column 2 */
.tabBodyCol2 {
font-family: tahoma, verdana, arial;
font-size: 12px;
text-align: center;
width: 300px;
overflow: hidden;
}


Softcomplex: http://www.softcomplex.com/
Back to forum: http://www.softcomplex.com/forum/