Okay I'm really stuck and I need some help.
I'm trying to add coloured borders (left and right) to my site. So I give my body tag a colour, then make my wrapper/container white.
Now how do I create a margin between the background colour and the content so they arent right next to each other?
Usually I would just add padding: 10px; to the wrapper div and add 20px to the width. But for some reason this doesnt work anymore.
I'm pretty sure it use to be...
content + padding = width
Using margin will only create space outside the container so it'll still place the content right next to the background. Plus I'm already using margin-left: auto; margin-right: auto; which I use to centre the wrapper (is this how everyone does it now?)
So yeah I'm stuck and starting to get a headache. Should I stick with the 10px padding or use something else? I want to do it the right way and not the "this will do for now" way.
Any help much appreciated. |