Problem with CSS Visual Rules 9. Background Image


#1

Help! My code isn’t working and it won’t let me advance to the next section.

I have copied and pasted the right URL into the background-image property for the .image selector.

could somebody tell me where I’m going wrong please?

https://www.codecademy.com/courses/learn-css-selectors-visual-rules/lessons/css-visual-rules/exercises/background-image?action=resume_content_item&course_redirect=learn-css

Here is my code:

.image {
background-image:url(“https://s3.amazonaws.com/codecademy-content/courses/freelance-1/unit-2/soccer.jpeg”);
background-size: cover;
background-position: center;
height: 300px;
}


#2

What error message are you getting from this?


#3

Getting the following error message:

Did you make the .image element’s background image the url in the instructions?


#4

Try using this code:

.image {
  background-image: url("https://s3.amazonaws.com/codecademy-content/courses/freelance-1/unit-2/soccer.jpeg");
  background-size: cover;
  background-position: center;
  height: 300px;
}

If that doesn’t work, try refreshing your brower, restarting your browser, logging out of codecademy and back in, or try using another browser for this exercise.


#5

Thanks so much for your help! Got it working in another browser :slight_smile:


#6

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