Broken Image in Sololearn App | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Broken Image in Sololearn App

How do I correctly embed an online photo as background image to my project in Sololearn? It's keeps showing only the alt text despite me using the -img- tag in HTML and background-image tag in CSS https://code.sololearn.com/Wf9OOo4DXENs/?ref=app https://code.sololearn.com/Wf9OOo4DXENs/?ref=app

30th Jan 2023, 6:31 PM
Oguike Paschal
Oguike Paschal - avatar
4 Answers
+ 1
Now that the image loads up, I'm thinking maybe the headings' text Uzo Global Autos Dealer on all kind of Cars Needs to be in different colours. They don't look too contrast with the backgriund image, and not so easily noticed/read. Or use another background image on which those headings can stand out.
31st Jan 2023, 4:04 AM
Ipang
+ 6
It's not SoloLearn, the use of incorrect image URL is the problem. The URL of the actual image is https://www.wsupercars.com/wallpapers-regular/Lexus/2016-Lexus-RX-350-F-Sport-004-1080.jpg And you shouldn't use 'width' and 'height' attribute like in HTML <img> when specifying URL for 'background-image' in CSS * Attached code had been modified from its original state, to use a valid URL in updated version.
30th Jan 2023, 6:48 PM
Ipang
+ 2
Thanks Ipang!
30th Jan 2023, 7:13 PM
Oguike Paschal
Oguike Paschal - avatar
+ 1
Hello Ipang take a look at the code again 😌
30th Jan 2023, 7:27 PM
Oguike Paschal
Oguike Paschal - avatar