开发者

How can I make a table cell take no space?

I have a complex tree-like table layout (few cells on the left, many on the right), and I want to make certa开发者_StackOverflowin cells (and their rows) vanish completely (with Javascript, based on class).

visibility:hidden just makes the contents invisible, and setting the text-size and border of the cells makes them small, but I'm stuck with a few pixels left. I've tried line-height:0, padding:0 border-spacing:0, but the cells are still taking up about two pixels, with another two pixels vertically between them.

Does someone have a list of the css attributes which have to be zero to get a cell to disappear completely?


Use the CSS display property:

style="display: none;"

If that doesn't work wrap the content in a <span> and use it on that instead

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜