CSS classes for questions/apply CSS style to some questions only

flebfleb Czech RepublicCommunity Member Sage ✭✭✭

CSS classes for questions/apply CSS style to some questions only

Hello,
I want to change padding using following CSS code. However, I want to apply it to some questions only. Is there some way how to define a CSS class for questions in Qualtrics or to change CSS style in some question only using its ID or something like that?
Thank you very much for any ideas in advance.

.Skin .Separator {
margin:0px 20px;
}
.Skin .QuestionText {
font-size: 100%;
padding: 2px;
}
.Skin .QuestionBody {
padding:0px 1px 0px 1px;
}

.Skin .MC .MAHR .QuestionBody table td span.LabelWrapper label,
.Skin .MC .SAHR .QuestionBody table td span.LabelWrapper label {
    padding-bottom: 5px !important;
}
Tagged:

Best Answer

  • [Deleted User][Deleted User] Qubie ✭
    Accepted Answer

    Hello @fleb ,

    We can apply the required CSS on a specific page, using the below code

    jQuery(".Skin .Separator").css({"margin":"0px 20px"});

    And similarly for other codes

Answers

  • flebfleb Czech RepublicCommunity Member Sage ✭✭✭

    Hi @Shashi,
    thank you very much again. I'm able to solve my problem with this. However is there some way how to do it if I want to apply it only to a subset of question on one page?

  • TomGTomG Raleigh, NCCommunity Member, Product Ideas Wizard ✭✭✭✭✭

    @fleb,

    You can make CSS specific to a page, by adding it in a <style> tag to any question text on the page instead of in Look & Feel.

    You can make CSS specific to a question by adding the question's id to the rule's selector. For example:

    #QID1 .QuestionBody { padding:0px 1px 0px 1px; }
    
  • flebfleb Czech RepublicCommunity Member Sage ✭✭✭

    @TomG
    Thank you very much.

Sign In to Comment