jQuery returning different heights for the same objects in WebKit (chrome) and Firefox

后端 未结 4 1845
野性不改
野性不改 2021-02-02 17:45

Im perplexed by this one.

jQuery.height() is coming back with different values in Firefox and Chrome. Measuring the pixels on-screen indicates that of the two, Chrome ap

4条回答
  •  广开言路
    2021-02-02 18:50

    Have you tried not styling the TD elements at all, but instead the DIV elements that wrap the cell? Then, calculate and set the DIV heights because that is more reliable? Let the table set the cell height automatically based on its content. This, because you already proved that the different browsers calculate TD heights differently (with border...)

提交回复
热议问题