Reputation: 3809
Currently I have:
body
{
background-image:url('images/background');
background-color:#000;
background-position:center;
background-repeat:repeat-y;
padding-right: 75px;
padding-left: 75px;
}
How can I get the background to act more like this:
body
{
background-image:url('images/background');
background-color:#000;
background-position:center;
background-repeat:repeat-y;
}
while still having padding for things within the body other than the background?
Basically, I want the background to not be effected by the padding settings, unlike the text, images, etc set within the body.
Upvotes: 0
Views: 3611
Reputation: 6672
Use Box-sizing property to take care of the padding as well as margins
Upvotes: 0
Reputation: 360832
Rearrange things a little, so you have a new top-level container within your body, so that...
<body ...background goes here ...>
<div id="therealbody" ... padding goes here ...> ... content here ... </div>
</body>
Upvotes: 1