Last active
September 14, 2023 09:16
-
-
Save iamrealfarhanbd/e5a1a2011c218b7ff6396a2c589046af to your computer and use it in GitHub Desktop.
Custom CSS code to make the left two columns of a Ninja Table sticky when scrolling to the right.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#footable_parent_NT_ID tbody tr td:nth-child(1), #footable_parent_NT_ID thead th:nth-child(1){ | |
position: sticky; | |
position: -webkit-sticky; | |
left: 0; | |
z-index: 1; | |
background: #fafafb; | |
font-weight:bold; | |
} | |
#footable_parent_NT_ID tbody tr td:nth-child(2), #footable_parent_NT_ID thead th:nth-child(2){ | |
position: sticky; | |
position: -webkit-sticky; | |
left: 170px; /*You need to adjust position of 2nd column*/ | |
z-index: 1; | |
background: #fafafb; | |
font-weight:bold; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment