Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS background Image -> Using an image

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:

  1. Create a tile of the wood grain?
  2. Create a strip of the wood grain?

Current CSS

html{
    background: url('../img/Body_BG.png') repeat-x 0 0 scroll;
    background-color:#0C0C0C;
    height:100%;
    width:100%;
}

Image

enter image description here

like image 500
Jess McKenzie Avatar asked Dec 02 '25 13:12

Jess McKenzie


1 Answers

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%;
}
like image 54
ThinkingStiff Avatar answered Dec 05 '25 03:12

ThinkingStiff



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!