Aligning MC options | Experience Community
Skip to main content
Solved

Aligning MC options

  • Jul 12, 2023 2:57 PM UTC
  • 4 replies
  • 90 views

JohannesCE
Level 6 ●●●●●●
Forum|alt.badge.img+12

Hi! I have a MC question with 2 options and some styling. 

Right now, they are too far from each other (Classic Layout).

/* Style the yes/no question */
#QID176 label {
background: #F0F0F0;
padding: 15px;
color: #192743;
border-radius: 16px;
scale: 1.2;
}
#QID176-30-label:hover,
#QID176-30-label.q-checked {
background-color: #E73F12 !important;
background-image: none !important;
color: white !important;
}
#QID176-31-label:hover,
#QID176-31-label.q-checked {
background-color: #038141 !important;
background-image: none !important;
color: white !important;
}

How can I change the alignment? And why is this not working?

#QID176 .ChoiceStructure td {
padding: 0;
}

 

Best answer by Tom_1842

Is there any other code in place that might affect the display of the choices? When I add the CSS to a survey with Classic layout, I get the below:

The below CSS can adjust how far a part the choices are for a Multiple Choice question with 2 answer choices. Adjust the 150px as needed for horizontal spacing.

@media (min-width:480px) {

.Skin .MC .ChoiceStructure {
border-spacing: 150px 20px !important;
}

}

 

View original

4 replies

Forum|alt.badge.img+15
  • QPN Level 5 ●●●●●
  • Jul 12, 2023 2:59 PM UTC

Hi @JohannesCE ,

Can you try this?

#QID176 .ChoiceStructure td { padding: 0 !important; }


JohannesCE
Level 6 ●●●●●●
Forum|alt.badge.img+12
  • Author
  • Level 6 ●●●●●●
  • Jul 12, 2023 3:05 PM UTC

Hi @JohannesCE ,

Can you try this?

#QID176 .ChoiceStructure td { padding: 0 !important; }

I tried this one already, it's not working!


Tom_1842
Level 8 ●●●●●●●●
Forum|alt.badge.img+28
  • Level 8 ●●●●●●●●
  • Answer
  • Jul 16, 2023 8:33 PM UTC

Is there any other code in place that might affect the display of the choices? When I add the CSS to a survey with Classic layout, I get the below:

The below CSS can adjust how far a part the choices are for a Multiple Choice question with 2 answer choices. Adjust the 150px as needed for horizontal spacing.

@media (min-width:480px) {

.Skin .MC .ChoiceStructure {
border-spacing: 150px 20px !important;
}

}

 


JohannesCE
Level 6 ●●●●●●
Forum|alt.badge.img+12
  • Author
  • Level 6 ●●●●●●
  • Jul 17, 2023 7:29 AM UTC

Hi @Tom_1842, I have a long CSS script so it's definitely possible something is conflicting, but I can't find the problem. I can't make it work with your code, so I think I'm just gonna change it to vertical like this: