Learn Basic CSS by Building a Cafe Menu - Step 12

Hey, no matter, what I try (e.g. adding the h2 and p to h1 with commas) it constantly tells me, that I’m doing something wrong, as in adding a new style tag etc. Can anyone help me here?

Your code so far

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <title>Cafe Menu</title>

<!-- User Editable Region -->

    <style>
      h1 {
        text-align: center;
      }

    </style>

<!-- User Editable Region -->

  </head>
  <body>
    <main>
      <h1>CAMPER CAFE</h1>
      <p>Est. 2020</p>
      <section>
        <h2>Coffee</h2>
      </section>
    </main>
  </body>
</html>

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.5.2 Safari/605.1.15

Challenge: Learn Basic CSS by Building a Cafe Menu - Step 12

Link to the challenge:


For a reference. Even this doesn’t work. Bug?

REad the instructions carefully: " Center the h2 and p elements by adding a new type selector for each one to the existing style element."

It means that you have to add each new selector to look like the existing h1:

element { ....you should have three of these selectors in your code
 property: value;
}

Thanks for your reply! This is also one of the options I tried, please see the screenshot for a reference above.

Well, If you didn’t delete something before and after the ‘style’ element, try the following:

  1. Reset the step
  2. Refresh the page (F5)
  3. Some browser extensions, such as ad-blockers and dark mode extensions can interfere with the tests. If you face issues, we recommend disabling extensions that modify the content or layout of pages, while taking the course.
  4. Clear the browser cash and restart the browser
  5. Change the browser.
1 Like

Changing the browser worked (Chromium based). Thanks.

2 Likes

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