[SalesForce] Community Theme Full width layout

we use the napili theme which has a width of 1140px.
For a specific page i created a new community layout with the following code:

<aura:attribute name="column1" type="Aura.Component[]" required="false"/>

<div class="container">
    <div class="contentPanel">
        {!v.column1}
    </div>
</div>

and the following css

.THIS .contentPanel:before,
.THIS .contentPanel:after {
    content: "";
    display: table;
}
.THIS .contentPanel {
    width: 100%;
}

But through this layout will be inserted into

<div class="cCenterPanel" tabindex="-1" data-aura-rendered-by="247:0">

which has max-width:1140px it is not possible to get this page full width over the whole desktop.

Does anyone have an idea, how to override this max-width for that special page?

Best Answer

figured it out..

every page have its own body-class

.comm-page-custom-PAGENAME .cCenterPanel {
    max-width:100% !important;       
    margin:0
}

add this to your community css

Related Topic