Space between main content area and sidebar

Hi there,

I’ve used the code stated here : https://colorlibsupport.com/t/add-space-between-main-content-area-and-sidebar/#post-133013
in order to add space between main content area and sidebar and it’s working perfectly. However, it’s also applying to the pages that don’t have any sidebar so it pushes the content on the left and disturbs a code I use to display a third column on my front page.

Is there a way to apply the code only on pages with sidebar ?
Thank you so much for your precious help and reactivity !
Celine

Hi Celine,

I hope you are well today and thank you for your question.

You can achieve it by using the below CSS code instead of the shared CSS code.

@media (min-width: 992px){
.has-sidebar-right .container {
max-width: 1190px;
}
.has-sidebar-right div#secondary {
width: 30%;
float: right;
}
.has-sidebar-right .main-content-inner.col-md-8 {
width: 65%;
}
}

Best Regards,
Movin

Thank you Movin !
It doesn’t affect the front page anymore but it doesn’t seem to change anything to the sidebar and main content width (I tried with different numbers also).
Thank you,
Celine

Could you please share me the page URL from your site where it is not affecting so that i can help you to achieve it?