Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Columns are miss-aligned when zoomin in/out with the browser #88

Open
dalvarezmartinez1 opened this issue Oct 14, 2020 · 1 comment
Open

Comments

@dalvarezmartinez1
Copy link

dalvarezmartinez1 commented Oct 14, 2020

Reproducible in Chrome

Everything is pretty standard except cells have a right border (to check if columns become miss-aligned)

    table.dataTable thead th,
    table.dataTable tbody td {
      border-right: 1px solid red;
    }

When zooming in with the browser, for example at 150%, the borders start to become miss-aligned, the more to the right, the worse it becomes. Zooming out at 80% causes the same issue. https://jsfiddle.net/dalvarezmartinez1/jo6vnd1c/12/

Note, the problem is not reproducible, if instead of borders, we're using background-color to observe the miss-alignment

    table.dataTable thead th:nth-child(odd) {
      background-color:red;
    }
    table.dataTable tbody td:nth-child(odd) {
       background-color:blue;
    }

Not reproducible with background color instead of border: https://jsfiddle.net/dalvarezmartinez1/jo6vnd1c/19/

@colin0117
Copy link
Collaborator

Please see my reply on your forum thread. https://datatables.net/forums/discussion/65631/miss-aligned-columns-when-zooming#latest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants