Background-image is not showing

When I try to put the original link for my background image it shows

 background-image: url("");

But when I do my file version it does not

 background-image: url("images/Background.PNG");

Maybe it is because the background can not do PNG or my resolution is not right because before the link was JPG all I did was use an image format converter for high quality.

Note I have tried images/Background.png lowercase instead of the upper case it did not work.

The image you linked is a jpg, you can’t convert it to png just by changing the file extension.

I used an online convorter

Yeah sorry just saw that you already mentioned it.

CSS background-image can be jpg, png, svg or whatever else format, so if the image is not showing, you might have the wrong image path. Can you post a screenshot of your folder structure showing where the .css file and the image are located?

oh. I JUST solved it I put the CSS in the HTML

 background-image: url("images/Background.PNG");

IT worked

Yes because you’ve the wrong path. If your .css file is not in the same folder as the index.html, you’d have to move out of the subfolder first:

background-image: url("../images/Background.PNG");

On a side note, it’s impossible to improve the quality of a jpg by converting it to png, the png will have the exact same image information as the jpg.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.