Learn Basic CSS by Building a Cafe Menu - Step 11

Tell us what’s happening:
I can’t get a valid code, not sure on how to change the element part of the example with the actual code so that the style element can operate how it’s supposed to.

I want to make (h1) go to the center yet I can’t with the example code given.

Your code so far

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <title>Cafe Menu</title>
    <style>
    </style>
  </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 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36

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

Link to the challenge:

It doesn’t look like you attempted it yet. The challenge gives you this structure to follow

element {
 property: value;
}

Given what the challenge instructs you to do. Do you know what your element, property, and value would be?

That structure needs to go between the style tags, and replaced with what the challenge gives you

Yes, I’ve already tried.

I don’t know if I’m mistaken, I believe it’s element = (h1), property = text-align, value = center.

That’s what I’m doing. So it looks like this:

h1 { text-align: center; }

It looks right. Can you paste your entire code with that between the style tags so that we can see everything. The code you posted before does not show that inside the style tags. Just so we can double check that theres not something being missed.

When you reply you can use the format button that looks like </> and paste all your code between the lines it gives you

Sure, my bad. Sorry.

Yes, I’ll post it, give me a couple minutes.

Thanks.

I appreciate your help. I don’t know what it was, I restarted the test and ran the exact same code and it compiled succesfully.

1 Like

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