burebistaruler burebistaruler - 1 year ago 99
HTML Question

Table th height not working

I have this problem with tables from my app.
When the description of a td from tr is very large this is pushing my th name on more lines. Is possible to set for tr th a height for example 10 px in order to not be modified on many lines when td description is very large?

Check my fiddle:

Answer Source

Yes, add the following bit of code to your CSS:

th { white-space:nowrap; }

Which is basically the equivalent of:

<span>Start&nbsp;date&nbsp;Column</span> <!-- &nbsp; = non-breaking space -->

Both methods ensure that the TH contents are not wrapped onto two lines.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download