Back to Freecodecamp

Step 19

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

latest1.2 KB
Original Source

--description--

Now use the existing #menu selector to set the background color of the div element to be burlywood.

--hints--

You should set the background-color property to burlywood.

js
const hasBackgroundColor = new __helpers.CSSHelp(document).getCSSRules().some(x => x.style['background-color'] === 'burlywood');
assert.isTrue(hasBackgroundColor);

Your #menu selector should have a burlywood background.

js
const divBackground = new __helpers.CSSHelp(document).getStyle('#menu')?.getPropertyValue('background-color');
assert.equal(divBackground, 'burlywood');

--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 {
  /*
  background-color: burlywood;
  */
}

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

#menu {
  width: 300px;
--fcc-editable-region--
  
--fcc-editable-region--
}