How to get MC questions right-aligned? | XM Community
Skip to main content
Question

How to get MC questions right-aligned?

  • August 1, 2024
  • 3 replies
  • 81 views

Forum|alt.badge.img+1

Hello! I am trying to figure out how to get the MC answers aligned with the question text. I currently have two columns coded in CSS: the left one includes the pinned image, and the right includes the questions and answers. Additionally, this is a very complex survey (with over 400 questions), so the ability to replicate this process throughout would be helpful! I have included a screenshot and the code (CSS & HTML) I have been using thus far - I have not tried JavaScript (I am not super knowledgable) 

CSS:

/* Create a two-column layout */
#TwoColumnLayout {
    display: flex;
    flex-direction: row;
}

/* Style the left column (for the pinned image) */
#LeftColumn {
    position: fixed;
    top: 10px;
    left: 10px;
    width: 50%; /* Adjust the width as needed */
    height: auto;
}

/* Style the right column (for the survey questions) */
#RightColumn {
    margin-left: 32%; /* Adjust the margin to prevent overlap */
    width: 68%; /* Adjust the width as needed */
}

HTML (I put every question in the right column using the code below):

<div id="RightColumn">How likely are you to recommend this job candidate to a future employer?</div>
 

Does anyone have any suggestions? Thanks! 

3 replies

ArunDubey
QPN Level 8 ●●●●●●●●
Forum|alt.badge.img+41
  • QPN Level 8 ●●●●●●●●
  • 589 replies
  • August 1, 2024

Did you try to use matrix and side by side setup for the same form. Use that instead of custom scripting 


Forum|alt.badge.img+1

@ArunDubey Since there are numerous questions with different formats, I’m not sure matrix set up would work. Could you provide more details on how to achieve this?


Deepak
QPN Level 8 ●●●●●●●●
Forum|alt.badge.img+46
  • 1555 replies
  • August 2, 2024
.Skin .MC .MAHR .QuestionBody table td label, .Skin .MC .SAHR .QuestionBody table td label {

text-align: right;
}

Try adding in CSS