Display block problem

hello everyone I’m new here… i’m stuck in this learning basic css in making coffee menu in step 90.

Your code so far

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.


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

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36

Challenge: Step 90

Link to the challenge:

Welcome to the forums!

Try adding the semicolon ( ; ) after each of your properties.

1 Like

ohh OK thank you very much :slight_smile:

You are welcome. Don’t hesitate to ask if you have further issues with this challenge or post a new post if you have issues later on with anything.

Hello, pls


I’m having same difficulty. I already added semi-colon but still gives the same issue

You should start a new post for your issue rather than add on to a post that is months old. Use the Ask for Help button on the step you are stuck on as that will also include your HTML.

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