Responsive Web Design: Image Response: Auto Display Probz

Responsive Web Design: Image Response: Auto Display Probz
0
#1

I have written word for word, space for space, the solution as shown in the video, and the code continues to tell me that the display is not set to “block.” I have logged out, logged back in, opened with different browsers, refreshed, moved the spaces around, deleted spaces, added spaces, moved the code around, etc. Nothing has worked. Code is below

curly bracket img max-width: 100%; display: block; height: auto; curly bracket
0 Likes

#2

If you use the Ask for help button it is easier to see exactly what code you have. Or edit your post and use the code formatting, post all the code.

BTW, This is how I read your code (might just be a mistake):

curly bracket img max-width: 100%; display: block; height: auto; curly bracket

{ img
  max-width: 100%;
  display: block;
  height: auto;
}

It should be:

img {
..CSS
}
0 Likes

#3

What I wrote was my attempt at code formatting, but adding “…CSS” did not change the result. Thank you for your feedback.

0 Likes

#4

If you copy and paste the code from the challenge in the box under the “You can use:” does it fail the test?

0 Likes

#5

Amharg, I don’t believe lasjorg meant to literally type “…CSS” within the curly brackets. This is just his placeholder text to show you where your CSS declarations go. The important fix is quoted below.

Lasjorg is pointing out that you should have the img tag outside of your curly brackets, not inside. The final, working code is written out below just as Lasjorg pointed out, just without the placeholder text. Let us know if this works for you.

img {
  max-width: 100%;
  display: block;
  height: auto;
}

1 Like

#6

OH MY GATOS thank you. I’ve been stuck on this for months. And I needed to further explanation. It worked!

0 Likes