Have an idea?

Visit Sawtooth Software Feedback to share your ideas on how we can improve our products.

Fix column header row of table

Hello all,

In a grid question I am trying to fix the position of a table column header row position (when the respondent is scrolling down, the table being fairly high, so that the column headers are always visible).

The cleanest solutions I find on forums involve using a <thead> for the "top row" and a <tbody> for the rest of the table, and then using position:sticky on the <thead>.
But I can't seem to "transform" the .inner_table to achieve this.

I have a feeling this might have already been answered / addressed in this forum, but I cannot seem to find the related messages.

Any ideas / pointers?

Cheers!
asked Apr 15 by amic Bronze (1,145 points)
According to caniuse.com, support for "sticky" isn't yet universal between all major browsers.  Do IE users represent a significant portion of your expected respondents?

https://caniuse.com/#feat=css-sticky

Would this post be helpful to you?

https://sawtoothsoftware.com/forum/11297
Hey Zach,

I will check this out and let you know.

Thanks!
Hey Zach,

Kind of works but the visual display is not great (I am getting vertical scroll bars -on the table itself, on the whole page as well, and problematic to fix the height as I don't know what page height respondents will use).

Anyway in this case the client decided to drastically cut down the number of items tested so I'm OK for now, but I'll have another look as this really would be a neat feature to have.

Thanks.

Your solution to the original question

Please only use this to answer the original question. Otherwise please use comments.
Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:

To avoid this verification in future, please log in or register.
...