Freezing top row of matrix table | XM Community
Skip to main content
Question

Freezing top row of matrix table

  • January 27, 2025
  • 4 replies
  • 73 views

Forum|alt.badge.img+1

Hi! I want to freeze the top row of my matrix table so you continue to see it as you scroll. This is the code I am currently using:

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

question text here

 

This is the result that gives me:

 

How can I change the code so that the matrix scale in the middle (with the white background) goes away, leaving just the question text, and the matrix scale in grey?

Thank you!

4 replies

vgayraud
QPN Level 5 ●●●●●
Forum|alt.badge.img+48
  • QPN Level 5 ●●●●●
  • 373 replies
  • January 27, 2025

I’m not able to replicate this behaviour. Could you share which layout you’re using and your survey builder setup?


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

@vgayraud 

Oh weird. I’m using the “Flat” layout. I’m not sure what setting the builder setup refers to, but I haven’t made any other major changes. I do have a code I’ve been using (below) to make the screen wider in the “Look and feel -> Style” CSS, would that be interfering with anything?

#SkinContent{ width:80vw; } .Skin .QuestionOuter.Matrix{ width:80vw; max-width:80vw; }

 

Let me know what other information would be important to know!


vgayraud
QPN Level 5 ●●●●●
Forum|alt.badge.img+48
  • QPN Level 5 ●●●●●
  • 373 replies
  • January 28, 2025

Is it possible that you’re using both labels and scale points in your question? That’s the only way I’m able to replicate this bug.

 


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

@vgayraud I figured it out! It looks like I had some code in the JavaScript from another question that was causing the problem.

 


Leave a Reply