I have a TD with a fixed width in pixels. Despite the w开发者_运维百科idth of the TD being set, and the following css applied to the TD, my text is going beyond the width of the TD (I don't want the text to wrap), whereas, I want anything beyond the width of the TD to be hidden.
Here is the CSS I have in place at the moment:
td { overflow:hidden; white-space:nowrap; width:100px !important; }
You need to wrap everything inside the td
in a div
, and give that the same rules.
td, div { overflow:hidden; white-space:nowrap; width:100px !important; }
精彩评论