Learn Basic CSS by Building a Cafe Menu: step 92

Tell us what’s happening:
I am trying to complete the last step (92) The instructions are:
" use a negative top margin of 25px in the img type selector."

Your code so far
img: {
display: block;
margin-left: auto;
margin-right: auto;
margin-top: -25px;
}

Here is the message I get:
“Test: Sorry, your code does not pass. Hang in there.
Hint: You should set the margin-top property to -25px .”

Your browser information:
Firefox latest version: 99.0.1
User Agent is: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:99.0) Gecko/20100101 Firefox/99.0

Challenge: Step 92

Link to the challenge:

You don’t need colons when selecting the element to style.

element {
  // style goes here
}
1 Like

I figured it out. The “margin-top” should be at the top of the code like this:

img: {
margin-top: -25px;
display: block;
margin-left: auto;
margin-right: auto;
}

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