Back to Freecodecamp

Step 9

curriculum/challenges/english/blocks/workshop-piano/612e8eebe3a6dc3fcc33a66f.md

latest2.2 KB
Original Source

--description--

Now target your #piano element with an id selector. Set its background-color property to #00471b, the width property to 992px and the height property to 290px.

--hints--

You should have a #piano selector.

js
assert.exists(new __helpers.CSSHelp(document).getStyle('#piano'));

Your #piano selector should have the background-color property set to #00471b.

js
assert.equal(new __helpers.CSSHelp(document).getStyle('#piano')?.backgroundColor, 'rgb(0, 71, 27)');

Your #piano selector should have a width property set to 992px.

js
assert.equal(new __helpers.CSSHelp(document).getStyle('#piano')?.width, '992px');

Your #piano selector should have the height set to 290px.

js
assert.equal(new __helpers.CSSHelp(document).getStyle('#piano')?.height, '290px');

--seed--

--seed-contents--

html
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>Piano</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <link rel="stylesheet" href="./styles.css">
  </head>
  <body>
    <div id="piano">
      <div class="keys">
        <div class="key"></div>
        <div class="key black--key"></div>
        <div class="key black--key"></div>
        <div class="key"></div>
        <div class="key black--key"></div>
        <div class="key black--key"></div>
        <div class="key black--key"></div>

        <div class="key"></div>
        <div class="key black--key"></div>
        <div class="key black--key"></div>
        <div class="key"></div>
        <div class="key black--key"></div>
        <div class="key black--key"></div>
        <div class="key black--key"></div>

        <div class="key"></div>
        <div class="key black--key"></div>
        <div class="key black--key"></div>
        <div class="key"></div>
        <div class="key black--key"></div>
        <div class="key black--key"></div>
        <div class="key black--key"></div>
      </div>
    </div>
  </body>
</html>
css
html {
  box-sizing: border-box;
}

*, *::before, *::after {
  box-sizing: inherit;
}

--fcc-editable-region--

--fcc-editable-region--