I am developing a new theme for Magento 2, based on Magento/blank.
I am trying to remove the div "page-wrapper", unsuccessfully.
Inside my app/design/frontend/custom/theme/Magento_Theme/layout/default.xml I inserted the following <referenceContainer name="page_wrapper" remove="true"/> but nothing happens, the div is still there. What should I do to remove it?

1 Answer 1


You have to use the block name.

<referenceContainer name="page.wrapper" remove="true"/>
  • I tried your way, but the div is still there
    – giani.sim
    Feb 6, 2017 at 21:39
  • That's weird, I just tried it myself. Have you cleared the cache? Can you post the whole xml?
    – nuovecode
    Feb 6, 2017 at 22:12
  • It works, I made a typo error. I named the xml deafult instead of default :(
    – giani.sim
    Feb 6, 2017 at 22:24
  • yee! good work :)
    – nuovecode
    Feb 6, 2017 at 22:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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