Home › Forums › CSS › Setting a background to HTML › Re: Setting a background to HTML
July 4, 2013 at 5:23 am
#141511
CodeGraphics
Participant
It’s pretty simple.
Your html just look like this:
Your css should look like this:
body{
background:url(yourImage.jpg)no-repeat center center fixed;
background-size:cover;
height:100%;
}
.wrapper{
width:960px;
margin:50px auto;
}
Here is a codepen: http://codepen.io/anon/full/mpHEa
Basically, you can make the body background-image to be something like 1500px/600px