Quick question:
How do I create a layout where all the elements' backgrounds stretch across the width of the screen, but the content stays narrow, let's say 1000px? I'm looking to come up with something like this:
https://themeforest.net/item/itcore-site-template/3638733
For the record, I know how to code, I just don't know what the best approach is to this. I'm sure there's a 'best practice' to achieve this and having built 100% width dashboards only, I never worked with it.
Any tips?
You simply combine two elements, one that will fit the window (on which you can apply some background and other styling that cover the viewport), and another container in the center of the page. I recommend you to use
max-width
to allow it to shrink on smaller devices.Then your CSS is as simple as