Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Setting a background to HTML Re: Setting a background to HTML

#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