Fixed Header is not aligning correctly vertically on scroll in small screens
Fixed Header is not aligning correctly vertically on scroll in small screens

Description of problem: Fixed Header is not aligning correctly vertically on scroll in small screens
Answers
This example seems to work correctly on an iPhone. Make sure you have all the correct JS and CSS files for the style framework being used. Use the Download Builder for this.
If you still need help please provide a link to a test case replicating the issue so it can be debugged.
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin
Hi Kevin,
I have something that seems the same issue.
This is my web page https://sailwave.com/results/huw/Sailwave-DataTables-ExperimentV08.htm.
I look forward to any pointers for resolving the issue.
PS - you kindly helped point me in the right direction with other issues on the aforementioned page, which were much appreciated.
Kind regards,
Huw
@Huw_Pearce
I copied the relevant parts of your code into this test case so I could experiment.
https://live.datatables.net/rukorose/1/edit
It looks like you have defined
colgroup
for each table. Datatables also definescolgroup
to help handle column widths correctly. I don't know all the details of how this works.In the test case I removed the
colgroup
from the first two tables. Scroll through the first two tables and you will see when the fixHeader is applied the header width stays the correct width. However when the FixedHeader is applied to the third table the column width is incorrect. Inspecting the header you will see twocolspan
elements; The first is created by Datatables and the second is yours with thestyle
attribute added. For example:It seems these are conflicting. I'm not sure if you are using
colgroup
for anything in your solution. If not removing them might resolve the issue. @allan will need to look to debug further.Kevin
Hi Kevin,
Thank you for your prompt answer and pointer to where there is conflict in my code.
I will go and look at my code with your insight.
Thank you very much.
Kind regards,
Huw
@Huw_Pearce I forgot to mention a couple other issues I found. First is you have the same
id
for each table:id="summarytable
. Theid
attribute is expected to be unique on the page. One option is to add a digit to eachid
to make them unique, for example:id="summarytable1
.Second is this statement on line 42 is missing a close quote after
.css
:That CSS is not being loaded. It should look like this:
Kevin