STEP 89 not working in CSS basics

Step 89

The image you added is not centered horizontally like the Coffee heading above it. img elements are “like” inline elements.

To make the image behave like heading elements (which are block-level), create an img type selector and use the value block for the display property and use the applicable margin-left and margin-right values to center it horizontally.
This is the code I put in

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

the img portion isnt turning brown like the rest of them… and i get this message

Sorry, your code does not pass. Hang in there.

You should use an img selector.

That message means something is wrong with your code.

Please post all of your CSS instead of only this but. You may have accidentally deleted something.

Please post your CSS since that’s what this step is supposed to be about. Thanks

body {
  background-image: url(https://cdn.freecodecamp.org/curriculum/css-cafe/beans.jpg);
  font-family: sans-serif;
  padding: 20px;
}

h1 {
  font-size: 40px;
  margin-top: 0;
  margin-bottom: 15px;
}

h2 {
  font-size: 30px;
}

.established {
  font-style: italic;
}

h1, h2, p {
  text-align: center;
}

.menu {
  width: 80%;
  background-color: burlywood;
  margin-left: auto;
  margin-right: auto;
  padding: 20px;
  max-width: 500px;

You seem to have accidentally cut off part of the code

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