Skip to content Skip to sidebar Skip to footer

Horizontal Scrolling On Table With Fixed Header

I have created a fixed header using CSS (mainly just setting the position of the thead to be fixed), but the problem that I run in to is if the user's resolution size or window siz

Solution 1:

Assuming you're not doing something in Javascript which produces strange behavior on tables, you can just wrap the table in a

<divstyle="overflow-x: scroll;">
   [your table here]
 </div>

or some other block element with the same style, and you'll get the behavior you seek, including the head and body scrolling along with one another -- see this jsfiddle for a working example.

Post a Comment for "Horizontal Scrolling On Table With Fixed Header"