Firefox 1 pixel bug with border-collapse, workaround?

后端 未结 12 2587
误落风尘
误落风尘 2020-12-07 18:59

Is there any workaround for the following \"1 pixel to the left\" bug?

    

        
12条回答
  •  自闭症患者
    2020-12-07 19:27

    table { border-spacing: 0; *border-collapse: collapse; }
    

    wasn't working for me in FF 31. Since i've different colors for thead and tbody cells the table background-color trick wasn't working, too. The only solution was the following:

    table {
      border-collapse: separate;
    }    
    table tbody td {
      border: 1px solid #000;
      border-top: none;
      border-left: none;
    
      &:first-child {
        border-left: 1px solid #000;
      }
    }
    table thead th {
      border-bottom: 1px solid #ff0000;
    
      &:first-child {
        border-left: 1px solid #ff0000;
      }
      &:last-child {
        border-right: 1px solid #ff0000;
      }
    }
    

提交回复
热议问题