How to remove Body inheritance in its child section

Hello, I set values for page width for my Body: width: auto; max width:1200px. And all works fine, but I want my footer to be full width no matter viewport width. How can I remove body inheritance?
Even if i add new class to footer in hope it will override Body settings, it doesnt work.

hi @Izabela the simplest way to do this is by keeping the ‘body’ element as it is and wrapping your content in a new ‘div’. You can give this div a class, like ‘main’, and set its ‘max-width’ property. After that, just put your footer (or navigation) outside of this ‘main’. With this HTML setup, you’ll get the design you’re looking for!

body
  main
   content
  main
  footer
body
1 Like

thanks @Stan :slight_smile: added new div for main content, removed max width for body and looks good.