Reputation: 91
I used an actual image for the background-image inside body
tags then fixed it to have an example of the actual site
When I view on a large screen the background image tiles like this
How can I make it in such a way that the image does not tile and remains a 'single' that was shown in the actual website.
The CSS I'm using is below
body {
margin:0; padding:0;
background: url(../images/new.jpg) fixed #A8BFAD;
}
Upvotes: 0
Views: 2462
Reputation: 36662
If you want the image to remain actual size:
body {
background: url(../images/new.jpg) fixed #A8BFAD no-repeat;
}
If you want the image to fill the screen:
body {
background: url(../images/new.jpg) fixed #A8BFAD;
background-size: cover;
}
Upvotes: 4
Reputation: 635
Add background-repeat:no-repeat;
to body
in your CSS
body {
margin:0;
padding:0;
background: url(../images/new.jpg) fixed #A8BFAD;
background-repeat:no-repeat;
}
Upvotes: 0