开发者

Can't hover <tr>

开发者 https://www.devze.com 2023-03-05 02:20 出处:网络
I\'ve got a table displaying some data. When hovering a row that row is highlighted (for various reasons I do this by adding a class with jQuery).

I've got a table displaying some data. When hovering a row that row is highlighted (for various reasons I do this by adding a class with jQuery).

Now the problem is that in 1-2px between table cells the hover don't work. I've checked in the webkit inspector and it seams like the whole table is "triggered" between the cells not the tr.

I got some padding in the td's but 开发者_开发问答no margins so that shouldn't be the problem?

Any suggestions?

Update

None of the following seam to work: cellspacing="0" on the <table>, border-spacing: 0; or border-collapse: collapse; on the CSS.


Add cellspacing="0" to the <table> (or border-spacing: 0; to the CSS).


Or add border-collapse: collapse; to the table's CSSs.


Try setting:

table
{
    border-spacing: 0;
}

This is the CSS equivalent of the old "cellspacing" attribute on the table.

0

精彩评论

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