Full background image? | SoloLearn: Learn to code for FREE!

+1

Full background image?

Was wondering how to make a background image fullscreen using css.

4/10/2018 1:09:26 AM

Daniel Cooper

12 Answers

New Answer

+6

Aaron Stone like this. background-size: 200%; To change background size. Change the Percentage. The Percentage is a width of the background. And the height will be set automatically base on the picture proportion.

+4

Is this What You Want? Daniel Cooper https://code.sololearn.com/W3sAVV47OOUx/?ref=app

+4

Daniel Cooper If you want to be cover. You have to set the background size in your own size.

+4

Like this that I'd been changed. https://code.sololearn.com/W3sAVV47OOUx/?ref=app

+2

That's how you do it... body { background:url("image.jpg"); }

+2

Daniel Cooper Not possible if the width of the image does not allow to

+2

Warith Vatanaplachaigoon How can we do that?:|

+2

Wow Warith Vatanaplachaigoon Thanks !!

+2

Use- <body background="Image Location including image name and extension"> </body>

+1

I want the image to cover the entirety of the page

+1

Try background-size:cover; It will take full width of the screen. You cam set the height if you want.

+1

Also, add background-repeat:no-repeat; That makes the image to not repeat.