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

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!

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


@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!


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.

 


@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