How can I freeze the top row in a matrix question? | XM Community
Skip to main content
Solved

How can I freeze the top row in a matrix question?

  • November 13, 2024
  • 4 replies
  • 172 views

Forum|alt.badge.img+1

Hi Qualtrics users,

 

I have a survey which contains matrices with a lot of rows. I would like to freeze the top row (with the answer options) so that when participants scroll to the lower rows, the answers remain. Can anyone help me with this?

 

Thanks so much.

Best answer by vgayraud

Hi,

You can try adding this style to your question text in source mode. Change max-height to your preference.

<style type="text/css">
.Skin .QuestionBody {
    max-height: 300px;
    overflow-y: auto;
}
.Skin .QuestionBody thead {
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 10;
}
</style>
Your question

 

View original

4 replies

vgayraud
QPN Level 5 ●●●●●
Forum|alt.badge.img+48
  • QPN Level 5 ●●●●●
  • 373 replies
  • Answer
  • November 13, 2024

Hi,

You can try adding this style to your question text in source mode. Change max-height to your preference.

<style type="text/css">
.Skin .QuestionBody {
    max-height: 300px;
    overflow-y: auto;
}
.Skin .QuestionBody thead {
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 10;
}
</style>
Your question

 


Forum|alt.badge.img+1
  • Author
  • 2 replies
  • November 13, 2024

Hi Vincent,

 

Thanks for your response! That seems to work in the question preview but when I preview the survey, I lose the matrix row options below the top row (see screenshot). Can you help with this?

 

 


vgayraud
QPN Level 5 ●●●●●
Forum|alt.badge.img+48
  • QPN Level 5 ●●●●●
  • 373 replies
  • November 13, 2024

Your 6th colum’s header is so long that it pushes the statements outside of the question’s allowed height. You can increase it but you’ll most probably end up with 2 scroll bars: one for the matrix and one for the whole window.

See if you can reduce the length of your choices, or the font size… You could also use Qualtrics’ “repeat headers” option instead.


Forum|alt.badge.img+1
  • Level 1 ●
  • 8 replies
  • January 23, 2025

Hi! I’m using this code for a matrix table, but it seems to duplicate the scale header, which takes up a lot of space on the screen:

 

Do you know any adjustments I can make to the code to eliminate the duplicated header (preferably eliminating the header that doesn’t line up with the matrix selections).

 

Thank you!


Leave a Reply