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

c# SetCompatibleTextRenderingDefault must be called before the first -

c++ - Fill runtime data at compile time with templates -

C#.NET Oracle.ManagedDataAccess ConfigSchema.xsd -