XF 2.3 Block theme

Ricsca

Well-known member
Licensed customer
How can I set the theme to be boxed, meaning the center of the page (with the nodes) is all white and the background on the sides is a different color?
 
Add this to your extra.less — it's the standard way to do a boxed layout:
Code:
html {
    background: #2c3e50;  /* your side background color */
}

.p-pageWrapper {
    max-width: 1200px;
    margin: 0 auto;
    background: @xf-contentBg;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.15);
}
That's the core of it. The max-width constrains the content, margin: 0 auto centers it, and the page background shows on the sides. You can also set the page background color from ACP > Style Properties > General > "Page background" instead of hardcoding it in CSS.
Adjust the max-width value to whatever width you want. You might also want to add some top/bottom padding on .p-pageWrapper if you want spacing above/below the boxed area.
 
Back
Top Bottom