How do i set a background image? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How do i set a background image?

I want to set a background image in HTML 5 and CSS 3 and I've tried everything but got no result please help me

2nd Nov 2018, 3:58 PM
prod.rai
prod.rai - avatar
3 Answers
+ 6
✓✓CSS  background-image: url("img.jpg"); height: 100%; background-position:center;     background-repeat: no-repeat;     background-size: cover; }
2nd Nov 2018, 4:05 PM
Sudarshan Rai
Sudarshan Rai - avatar
+ 2
If you've tried everything and got no result, it would help us help you better if you provided a link to your relevant project in the Code Playground. The Code Playground should be relatively easy to find in the website version of SoloLearn, but if you are in the app version, it can be accessed via the curly braces, green circle with plus sign to add a new project, then select the project type. Looking forward.
3rd Nov 2018, 12:38 AM
Janning⭐
Janning⭐ - avatar
0
Try this background-image: url("link to the imagel");
2nd Nov 2018, 4:03 PM
voidneo