How to get css background color on tag to span entire row

前端 未结 8 1452
旧时难觅i
旧时难觅i 2020-12-24 04:53

I have tried everything I can think of in css in order to get a background color to span an entire table row ( tag) But I keep getting a white border around each

相关标签:
8条回答
  • 2020-12-24 05:48

    This worked for me, even within a div:

          div.cntrblk tr:hover td {
            line-height: 150%;
            background-color: rgb(255,0,0);
            font-weight: bold;
            font-size: 150%;
            border: 0;
          }
    

    It selected the entire row, but I'd like it to not do the header, haven't looked at that yet. It also partially fixed the fonts that wouldn't scale-up with the hover??? Apparently you to have apply settings to the cell not the row, but select all the component cells with the tr:hover. On to tracking down the in-consistent font scaling problem. Sweet that CSS will do this.

    0 讨论(0)
  • 2020-12-24 05:51

    Firefox and Chrome are different
    Chrome ignores the TR's background-color
    Example: http://jsfiddle.net/T4NK3R/9SE4p/

    <tr style="background-color:#F00">
         <td style="background-color:#FFF; border-radius:20px">
    </tr>  
    

    In FF the TD gets red corners, in Chrome not

    0 讨论(0)
提交回复
热议问题