admin管理员组文章数量:1395408
Maybe what I am trying to acplish is not feasible but the general idea is that when a person clicks a table row, the page dims (like a modal) but leaves that row visible for editing. I tried setting the z-index of the table row itself but it did not work. It will work if I set the table rows position attribute to absolute
but that seems to remove the table row from the table pletely.
Maybe what I am trying to acplish is not feasible but the general idea is that when a person clicks a table row, the page dims (like a modal) but leaves that row visible for editing. I tried setting the z-index of the table row itself but it did not work. It will work if I set the table rows position attribute to absolute
but that seems to remove the table row from the table pletely.
- I don't have the answer - but have you tried setting the index of all cells inside the row, instead of the row? – xcut Commented Sep 7, 2010 at 18:49
4 Answers
Reset to default 3I can only think of more plicated solutions like these:
- You'll need 3 transparent gray divs instead of 1. Use the first to gray out the whole page. Set the z-index of the whole table to bring it above that div. Use the 2nd div to gray out everything above your row, and the third to gray out everything below your row, leaving just your row un-grayed.
- Gray out the whole page. Create a duplicate table with a single row that you hover above the original table. When you edit this new table, sync those values with the underlying table.
I've successfully done this just now using
div.milk { position:absolute; z-index:2; width:100%; height:100%; opacity:.5; }
tr.raised { position:relative; z-index:3; }
so, in short, position:relative seems to work ?
I must admit, I came here because I still have some weird issues. but overall it seems to work ?
*-pike
If you're using jQuery, try this:
$("<get the tr>").css("z-index", <value>);
i don't think you'll be able to acplish your desired effect with z-index. using overlay divs to mask everything around the table row seems like a more workable approach.
本文标签: javascriptHow do I set the zindex of a table rowStack Overflow
版权声明:本文标题:javascript - How do I set the z-index of a table row? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744111442a2591308.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论