CSS background image

Hello,

Why background image is not included? the picture exists on the internet.

.main {

background-image: url(https://s3.amazonaws.com/codecademy-content/courses/freelance-1/unit-5/tsunami-coffee/images/bg-photo.png);
background-size: cover;
  height: 30rem;
  padding-top: 1rem;
}

I already tried url(’ ') and url(" ")

I use vs code version: 1.45.0

I am really thankful for help!

Katha:)

Have you tried wrapping the image in quotation marks?

.main {

background-image: url("https://s3.amazonaws.com/codecademy-content/courses/freelance-1/unit-5/tsunami-coffee/images/bg-photo.png");
background-size: cover;
  height: 30rem;
  padding-top: 1rem;
}

If you have tried it as the above, you might need to post all of your HTML/CSS as what you have written should work if you’re using quotation marks to hold your url.

Technically, quotation marks shouldn’t be needed.

The code works as expected:

This was done using Sublime Text. Thus the only difference is Visual Studio Code.

Did you manage to get it to work, @justsql?

Hello :slight_smile:
How can i opacity the background-image? When i try, I opacity everything and i want to do it just on picture not on the text…
Thanks.