mirror of
https://github.com/DataTables/DataTables.git
synced 2024-11-29 11:24:10 +01:00
Fix: box-sizing: border-box would cause column misalignment when scrolling
- It is far from uncommon to do `* { box-sizing: border-box; }` at the top of your CSS these days, including in frameworks, but this could cause DataTables a little bit of a problem when scrolling both horizontally and vertically since the padding it adds to the header linear element to allow it to scroll over the vertical scrollbar would be folded into the width of the div linear, rather than added to it. - Fix is to simply set the box-sizing for the linear. I've decided to do this in Javascript rather than CSS since it is going to be needed regardless of the CSS being used.
This commit is contained in:
parent
f9ac4c64e2
commit
3f79e6cce4
@ -1 +1 @@
|
||||
cbadecf7c8c87fa07a5634861d1c162e5117a0cb
|
||||
f799420905648a780426600e304c31cc82e1e56d
|
||||
|
1
media/js/jquery.dataTables.js
vendored
1
media/js/jquery.dataTables.js
vendored
@ -3009,6 +3009,7 @@
|
||||
nScrollHead.style.border = "0";
|
||||
nScrollHead.style.width = "100%";
|
||||
nScrollFoot.style.border = "0";
|
||||
nScrollHeadInner.style.boxSizing = 'content-box';
|
||||
nScrollHeadInner.style.width = oSettings.oScroll.sXInner !== "" ?
|
||||
oSettings.oScroll.sXInner : "100%"; /* will be overwritten */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user