0

Each column's width of table is not equal in the Chrome when I set a width for the table,but each column's width is equal in the browser of Firefox and Edge. I want to get the equal width columns in Chrome..

<style>
td { border: 1px solid red; }
</style>
<table style="width: 555px">
  <tr>
    <td ></td><td ></td><td ></td><td ></td><td ></td>
  </tr>
</table>
Phil
  • 1
  • 2
  • Possible duplicate of [Make columns of equal width in ](https://stackoverflow.com/questions/20375288/make-columns-of-equal-width-in-table)
    – Stanislas Mar 07 '18 at 19:44

1 Answers1

0

I just tested this with the code below and my Chrome correctly renders the decimal pixels.

However, I assume that browsers would round up/down decimal places to pixels to avoid creating a blurry image. Which would mean that the resolution the browser is rendering to would have an impact.

Since Firefox and Chrome don't use the same browser engine, it's not surprising that there are minuscule differences in rendering.

td { border: 1px solid red; }
<table><tr><td style="width: 50px"></td></tr></table>
<table><tr><td style="width: 50.5px"></td></tr></table>
<table><tr><td style="width: 51px"></td></tr></table>
Stanislas
  • 1,893
  • 1
  • 11
  • 26
  • great thanks. You can add one row and test if every column is equal in your chrome :
    – Phil Mar 07 '18 at 18:34
  • I'm afraid I don't understand what you're saying, could you clarify this further? – Stanislas Mar 07 '18 at 18:56
  • Sorry, I don't describe the question clearly . I have updated the problem.Can you see it again,great thanks. – Phil Mar 07 '18 at 19:34