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

How to remove code from JUST one question?

  • April 1, 2024
  • 4 replies
  • 51 views

Forum|alt.badge.img+8

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.

Best answer by MaggieGentry

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>

4 replies

Forum|alt.badge.img+22
  • Level 7 ●●●●●●●
  • 2050 replies
  • April 2, 2024

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. 


Forum|alt.badge.img+8
  • Author
  • Level 2 ●●
  • 43 replies
  • April 2, 2024

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


Forum|alt.badge.img+22
  • Level 7 ●●●●●●●
  • 2050 replies
  • April 2, 2024

What is its selector?


Forum|alt.badge.img+8
  • Author
  • Level 2 ●●
  • 43 replies
  • Answer
  • April 2, 2024

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>