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

Fixed header calculation not accounting for spacing #31

Open
mmundy1 opened this issue Jul 8, 2021 · 0 comments
Open

Fixed header calculation not accounting for spacing #31

mmundy1 opened this issue Jul 8, 2021 · 0 comments

Comments

@mmundy1
Copy link

mmundy1 commented Jul 8, 2021

I was seeing some odd results in terms of the fixed column being under-width. After a bit of trace-back, I found that the difference between my code and the examples was the examples were setting cellspacing to 0. The outerwidth() in the calculation does not account for this, since it is between cell elements
I modded the code, starting with https://github.com/yidas/jquery-freeze-table/blob/master/dist/js/freeze-table.js#L441 to add 2 to the addWidth and then 2 more after the loop; 2px being the default (https://www.w3schools.com/cssref/pr_border-spacing.asp).
But of course that is not a general solution (it needs to look at cell spacing then if undefined, border spacing). I hope to work up a proper patch to submit, but in case I don't, I wanted to file the issue (and on the off chance there was already an option I just missed!)

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

1 participant