I have this layout and I want to be able to add a margin around every element but without changing the widths of each element.
I know that, for example with the header
, I am able to apply a margin: 10px;
(let's focus on the left and right margin) and a width: calc(100% - 20px)
which takes away 20px from the 100% to account for the margin.
Question:
Is there a way to do this without changing the width?
So I can keep the width 100% and not have to worry about how much margin I apply to the elements?