jquery - Margin-left on table based on screen width, with scrollbar -


i've got sticky table column employee names on left side of screen. , large table scrollbar next it.

the idea when im scroling right see content of large table sticky table column names pushes table right.

in way i've got nice overview of names on left side of screen, , it's not overlapping table.

can't seem work properly, have suggestions?

enter image description here

if want achieve effect excel fixed column:

do this:

.table-wrapper {      overflow-x:scroll;     overflow-y:visible;     width:250px;     margin-left: 120px; }  td, th {     padding: 5px 20px;     width: 100px; }  th:first-child {     position: fixed;     left: 5px } 

working demo


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -