Back to Freecodecamp

Step 19

curriculum/challenges/english/blocks/learn-intermediate-css-by-building-a-cat-painting/646c5ffef5598d449b52ec12.md

latest1.3 KB
Original Source

--description--

Now you should work on the cat's ears. There will be a right and a left ear, and inside each, there will be an inner ear.

Inside your .cat-head element, create a div element with the class cat-ears.

--hints--

You should not change the existing div element with the class cat-head.

js
assert(document.querySelectorAll('div.cat-head').length === 1);

You should create one div element inside your .cat-head element.

js
assert(document.querySelectorAll('.cat-head div').length === 1);

Your div element should have the class cat-ears.

js
assert(document.querySelectorAll('.cat-head div')[0]?.getAttribute('class') === 'cat-ears');

--seed--

--seed-contents--

html
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>fCC Cat Painting</title>
    <link rel="stylesheet" href="./styles.css">
</head>
<body>
    <main>
      --fcc-editable-region--
      <div class="cat-head">
        
      </div>
      --fcc-editable-region--
    </main>
</body>
</html>
css
* {
  box-sizing: border-box;
}

body {
  background-color: #c9d2fc;
}

.cat-head {
  position: absolute;
  right: 0;
  left: 0;
  top: 0;
  bottom: 0;
  margin: auto;
  background: linear-gradient(#5e5e5e 85%, #45454f 100%);
  width: 205px;
  height: 180px;
  border: 1px solid #000;
  border-radius: 46%;
}