Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Background-image CSS does not load

In an HTML webpage I created, a stylesheet is attached that, among other things, uses "background-image" to add an image from a CDN, using this code _

BODY{
background-image: url(https://CDN/FILE.jpg);
}

This seems to just create a blank background — however, when I turn off the style on the Element Inspector and then turn it on again, it works perfectly fine. What am I doing wrong?

Thanks.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

You probably forgot "" around the link.
Try background-image: url("https://CDN/FILE.jpg");

I’d suggest making an example in codepen if this isn’t the case.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading