Jump to content

CSS with <td>


CWeaver

Recommended Posts

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...