Thank you for taking the time to read this. I am currently working on a table within a div container (div0) where the data is dynamically generated, resulting in a table with unpredictable height and width. The outer div allows for both vertical and horizontal scrolling to navigate through the entire table. However, I have a specific requirement to keep the first column of the table fixed horizontally when scrolling horizontally; this means that while the rest of the columns scroll, the first one remains in place. Could you provide some guidance on how to achieve this?
My initial idea involves separating the contents of the first column (which should not scroll horizontally) into a separate div (div1), while placing the scrollable content in another div (div2). Both of these divs would be placed within a table row containing two cells. However, I have encountered two issues with this approach: firstly, the scrollbar from div2 overlaps inside div0 when scrolling right (I considered using a jQuery scrollbar but need help positioning it outside div2); secondly, there are alignment issues between the two divs.