0
<table>
    <tr><td class='header'>Some looooong not important header</td><td class='header'>....</td>........</tr>
    <tr><td>Important data</td><td></td>.........</tr>
</table>

How can I ignore 'header's content width in CSS? I mean, "Some looooong not important header" must be cropped to width of "Important data" and overflow must be hidden (not transferred to the next line).

What about version without hardcoded widths?

1 Answer 1

-1
<table>
<tr><td><div class="crop">Some looooong not important header</div></td>
    <td class='header'></td>
</tr>
<tr>
    <td class="width">Important data</td>
</tr>
</table>

and the CSS

.crop {width:100px;overflow:hidden;height:50px;line-height:50px;}
.width {100px;}

I have a demo here http://jsfiddle.net/Azzamean/qzgnkapw/

If you do not want to hard code the width of the td.. then just figure out what the width of it is and set that for your class on the div of your not important text.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.