How to remove code from JUST one question? | XM Community
Skip to main content

Hi All, 

I have this code programmed on the THEME of my survey:

.Skin .Matrix table thead th:last-of-type {
 border-left: 2px solid #8D8D8D4D;

.Skin .Matrix table .ChoiceRow td:last-of-type { 
 border-left: 2px solid #8D8D8D4D; 

.Skin .Matrix table .ChoiceRow td:last-of-type label { 
 margin-left:0px; 

.JFEScope .Skin .Matrix .q-matrix.mobile table td:last-of-type { 
 border-top: 2px solid #8D8D8D4D; 
 border-left: 0px;
}
.JFEScope .Skin .Matrix .q-matrix.mobile table td:last-of-type label { 
 margin-top:0px; 
}

 

HOWEVER, I don’t want to apply it to a (single) question. Is there a way to overwrite this in the javacode for a single question? - I would like it still applied to the theme, just removed/ignored for a single question.

You'll need to decide what you want it to be.

Taking the last one as an example, suppose you want the margin-top to be 10px for that particular question, you could add the js:

document.querySelectorAll(".JFEScope .Skin .Matrix .q-matrix.mobile table td:last-of-type label").style.marginTop= "10px";

 

And so on. 


@ahmedA  - I want to make the line white and/or not display the line that I programmed on the theme level


What is its selector?


I figured out a work around. Only program code on this one question, but turn the line white:

<style type="text/css">
.Skin .Matrix table thead th:last-of-type {
 border-left: 2px solid #FFFFFF;

.Skin .Matrix table .ChoiceRow td:last-of-type { 
 border-left: 2px solid #FFFFFF; 

.Skin .Matrix table .ChoiceRow td:last-of-type label { 
 margin-left:0px; 

.JFEScope .Skin .Matrix .q-matrix.mobile table td:last-of-type { 
 border-top: 2px solid #FFFFFF; 
 border-left: 0px;
}
.JFEScope .Skin .Matrix .q-matrix.mobile table td:last-of-type label { 
 margin-top:0px; 
}
</style>


Leave a Reply