Header cells shifted
Header cells shifted
soundlink
Posts: 2Questions: 1Answers: 0
I'm currently struggling getting the header cells correctly align to the body cells when using a table with a fixed header column. They are shifted one or two pixels to the left.
Example: http://live.datatables.net/lasenihe/4/
Any idea what's causing this in Chrome and IE11 / Edge?
This discussion has been closed.
Answers
The issue is your #example styling. I removed that and everything lined up nicely. Try not to have styling that affects the table itself as you can see it screws up DataTables attempt at lining up stuff.
For styling options, check out https://datatables.net/examples/styling/index.html
Okay, when I don't use the ID selector #example but add a class selector .example-table, the alignment is correct in Chrome.
But now the header cells are shifted one or two pixels to the right in IE 11 or Edge
http://live.datatables.net/cicuziqo/1/
If I remove the border right / bottom / left definitions from the table .example-table it looks okay in IE, too.
http://live.datatables.net/cicuziqo/2/
So it seems, as if the main table is not allowed to have a border...