I've been struggling to create a table where the first four columns are fixed, whereas the rest of them have a horizontal scrolling. I found this example first column fixed
It has the first column fixed. I am very new to CSS and cannot extend to make the four first columns fixed. Any one could help? Sorry, that should be very simple, I just can't.
CSS:
Html:
https://jsfiddle.net/h75zn59o/
Position:absolute; is what causes that first header column to be fixed. With the original CSS, it's just applied to "th", but using classes (in this example, col1, col2, etc.) we can assign different fixed positions to different columns. Because the columns are 100px wide, each following column is positioned another 100px left So, the first one is 0px, then 100px for col2, etc) to avoid overlap with the previous column.