Add horizontal line to a Matrix Table | XM Community
Solved

Add horizontal line to a Matrix Table

  • 3 August 2022
  • 6 replies
  • 531 views

Userlevel 3
Badge +7

Hi All,
I am attempting to add a horizontal line between Severe and Not Applicable on this Matrix table. However, I don't know the code for a horizontal line here:
image.pngimage.png

icon

Best answer by Tom_1842 3 August 2022, 21:31

View original

6 replies

Userlevel 7
Badge +27

Hi there, the below CSS should work for to add a divider line to the last row of a Matrix table:

<style>

.Matrix table{border-collapse:collapse !important;}

tr.ChoiceRow.bottom{border-top: 2px solid black;}

</style>

Userlevel 3
Badge +7

Thank you!

Badge +1

Tom_1842 do you maybe know how to add this horizontal line to a specific row in a matrix question?
For example, a matrix q with 4 rows and 3 columns, and I want to add it only after the 2nd row.

Many thanks.

Userlevel 7
Badge +27

Hi dmus you can approach this by using the Rich Content Editor's HTML/Source view "<>" to update your Question Text with the below:

<style type="text/css"> @media (min-width: 481px){.Matrix table{border-collapse:collapse !important;} tbody > tr:nth-child(2){border-bottom: 2px solid black;} } </style>

Badge

I am not seeing the CSS code for these.  Does anyone know why they no longer appear?

Userlevel 7
Badge +20

Hello @mrmoskowitz, thanks for bringing this to our attention! You should now be able to see the CSS code for both responses. 🙂

Leave a Reply