I created a new custom page_layout that I want to make full width.

My fullwidth-layout.xml file looks currently like this. But I want to make the main content full width. So that I can set this layout for some cms pages.

I want to keep the header and footer as default, but only the main content of the specific CMS page full width.

How can I achieve this?

<?xml version="1.0" ?>
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_layout.xsd">
    <update handle="empty"/>
    <referenceContainer name="page.wrapper">
        <container name="header.container" as="header_container" label="Page Header Container"  htmlTag="header" htmlClass="page-header" before="main.content"/>
        <container name="page.top" as="page_top" label="After Page Header" after="header.container"/>
        <container name="footer-container" as="footer" before="before.body.end" label="Page Footer Container" htmlTag="footer" htmlClass="page-footer" />
  • you can achive it by using css, add fullwidth layout and set custom width to your header and footer. Jan 29, 2019 at 10:10
  • @AasimGoriya Thanks, but what is the best way to add full width layout to this page_layout?
    – JGeer
    Jan 29, 2019 at 10:11
  • please check my ans. Jan 29, 2019 at 11:48

1 Answer 1


You can achieve it by using CSS, So please create a fullwidth layout and set custom width to your header and footer block using CSS.

You can create custom full-width layout using following url :

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.