Back to Freecodecamp

Step 18

curriculum/challenges/english/blocks/workshop-cafe-menu/5f356ed60a5decd94ab66986.md

latest1.3 KB
Original Source

--description--

Comments in CSS look like this:

css
/* comment here */

In your style sheet, comment out the line containing the background-color property and value, so you can see the effect of only styling the #menu element. This will make the background white again.

--hints--

You should comment out the background-color: burlywood; line in your CSS.

js
assert.match(code, /\/\*\s*background-color:\s*burlywood;?\s*\*\//i);

Your body should have a white background.

js
const body = document.querySelector("body");
const compStyles = window.getComputedStyle(body);
const backgroundColor = compStyles?.getPropertyValue('background-color');
assert.equal(backgroundColor, "rgba(0, 0, 0, 0)")

--seed--

--seed-contents--

html
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Cafe Menu</title>
    <link href="styles.css" rel="stylesheet"/>
  </head>
  <body>
    <div id="menu">
      <main>
        <h1>CAMPER CAFE</h1>
        <p>Est. 2020</p>
        <section>
          <h2>Coffee</h2>
        </section>
      </main>
    </div>
  </body>
</html>
css
body {
--fcc-editable-region--
  background-color: burlywood;
--fcc-editable-region--
}

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

#menu {
  width: 300px;
}