stuked with fixed width, any solutions pls

hi,

My <td> size is 40px now if in that <td> one complete string (without spaces) is shown up which is more then 40px, the td gets extended, I dont' want the td to get resized, but the text to wrap up. (mind it , it is string without any spaces).

I tried:

1) "table-layout:fixed" in css, this actually fixed the td size but the string got truncated/hidden after the specified size. moreover, in mozilla it's not working.

2) i also tried to put

.mywidth {

max-width:100px; /* for standards-compliant browsers */

width:expression(document.body.clientWidth > 100? "100px": "auto" ); /* max-width expression for IE only */

}

but no go.........

is there any solution for this?

[759 byte] By [prashantnagara] at [2007-11-27 2:40:59]
# 1

You might want to try a forum that deals with HTML and CSS. There is one with a Java related focus here: http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=forum&f=20

[Edit]

> (mind it , it is string without any spaces)

For what it's worth, this seems to be the problem. Most browsers will make columns wider when they encounter a long run of non whitespace characters.

pbrockway2a at 2007-7-12 3:04:20 > top of Java-index,Java Essentials,New To Java...
# 2
Yeah, this is a java forum, why you asking about css here?Anyway, you should try the overflow keyword in css,maybe overflow: none; may work?
DragonSlayrea at 2007-7-12 3:04:20 > top of Java-index,Java Essentials,New To Java...