Google Chrome bug with tr background

后端 未结 11 2047
天命终不由人
天命终不由人 2020-12-16 11:32

I\'m trying to set a background-image to a table row, but background is applied to all its td children.

In IE7 there is the same bug but it is solve with

<         


        
11条回答
  •  眼角桃花
    2020-12-16 12:20

    None of the workarounds mentioned worked for me quite right. Here's what I ended up with:

    TABLE TBODY.highlight {
        background-image: url(path/image.png);
    }
    
    TABLE>* {
        float: left;
        clear: both;
    }
    

    Only tested in Chrome and Firefox so no idea how it works in IE (not important in my case), but for me this works flawlessly!

提交回复
热议问题