Reputation: 8385
I am using the image below but I am using it as it is and it is not taking up the 100% of the screen.
I have thought of the following options but I would appreciate some advice on what to do:
Current CSS
html{
background: url('../img/Body_BG.png') repeat-x 0 0 scroll;
background-color:#0C0C0C;
height:100%;
width:100%;
}
Image
Upvotes: 3
Views: 25178
Reputation: 65341
Add background-size: 100% 100%;
to html
and change repeat-x
to no-repeat
.
Demo: http://jsfiddle.net/ThinkingStiff/jUr9E/
html{
background: url('https://i.sstatic.net/jGlzr.png') no-repeat 0 0 scroll;
background-color:#0C0C0C;
background-size: 100% 100%;
height:100%;
width:100%;
}
Upvotes: 4
Reputation: 8930
First, remove the radial gradient on the source image. Then create a strip with a few slats so it looks natural when repeated. To reproduce the gradient, use a css3 radial gradient background. If legacy browser support is a requirement, include a transparent png for the gradient as a fallback.
Upvotes: 1
Reputation: 4118
Using a strip will give you the bandwidth gain while still conserving some measure of quality, while using a tile with x-y repeat will reduce quality and give you higher bandwidth preservation.
Upvotes: 2