CSS - center align my entire survey | XM Community
Skip to main content

Hi there,

 

I am building a survey with custom CSS. Below is part of my syntax: 

body {
margin: 0;
padding: 0;
display: flex !important;
flex-direction: column !important;
align-items: center !important;
}
.content {
display: block;
width: 100%;
margin: 0 auto !important;
max-width: 800px;
}

I noticed that this CSS can centre my survey, but only if I set the max-width to be around or below 800px. However, when I try to increase the max-width, for example, to be 1200px, then this CSS doesn't work and my survey becomes left-aligned. Can I ask how to solve this alignment problem, as I want to increase the width of my survey content and keep the entire survey to be centred.

Many thanks in advance! Any insight would be greatly appreciated.

Be the first to reply!

Leave a Reply