开发者

Hide table but show borders in CSS

开发者 https://www.devze.com 2023-02-28 07:47 出处:网络
I\'m overlaying two tables and need to show only certain cells of the table which is on top. So I set visibility to hidden for the entire table and set visibility to visible for the cells I want to se

I'm overlaying two tables and need to show only certain cells of the table which is on top. So I set visibility to hidden for the entire table and set visibility to visible for the cells I want to see.

It works fine except that the cells which are visible do not have borders. The borders exist in CSS but since the DIV in which the table resides is invisible the borders are invisible too. Is there开发者_JS百科 any way I get around this?

The target browser is IE8.

If I set the mode to compatibility then all the borders turn up - even the ones for the invisible cells!

Thank you.


You might try wrapping the content of the table cells you want to be visible in a div and set the div to have the border you want:

<table>
<tr><td><div class="borderedClass">
//Content here</div></td>//other cells here</tr></table>
0

精彩评论

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