CWeaver Posted December 9, 2005 Share Posted December 9, 2005 I would like to no how to control the width and word wrap on a <td> using external CSS. Link to comment Share on other sites More sharing options...
S@m Posted December 9, 2005 Share Posted December 9, 2005 You could give that section inside the td a class and assign the width there. <td><p class="something">The text here would be formatted the way you want</p></td> .something { width: 50px; word-wrap: break-word; } Something like that.I am a rookie though, so I could be way off. Link to comment Share on other sites More sharing options...
F-Man Posted December 11, 2005 Share Posted December 11, 2005 word-wrap: break-word? More like white-space: nowrap if you want it to not wrap. If you want it to wrap, use white-space: normal or just nothing at all, since it's the default.As for the width, you can do it on a single td, though I'd be more tempted to do it on the whole column.<table><colgroup><col /><col class="main"><col /></colgroup><tr><td>C1</td><td>C2</td><td>C3</td></tr><tr><td>C1</td><td>C2</td><td>C3</td></tr><tr><td>C1</td><td>C2</td><td>C3</td></tr></table>Then give a width to "main". Link to comment Share on other sites More sharing options...
CWeaver Posted December 12, 2005 Author Share Posted December 12, 2005 Thanks. This was helpful. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now