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>

1

1 Answer 1

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>

3
  • great thanks. You can add one row and test if every column is equal in your chrome : <table style="width: 555px"><tr> <td ></td><td ></td><td ></td><td ></td><td ></td> </tr></table>
    – Phil
    Mar 7, 2018 at 18:34
  • I'm afraid I don't understand what you're saying, could you clarify this further?
    – Stanislas
    Mar 7, 2018 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 7, 2018 at 19:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.