---
id: 60a3e3396c7b40068ad69971
title: Hatua ya 8
challengeType: 0
dashedName: step-8
---

# --description--

Muda wa CSS.

Ingawa `<div>` yako haina maandishi, bado inachukuliwa kama kisanduku chenye maudhui. Andika sheria ya CSS inayotumia kichaguzi cha darasa `.canvas` na uweke `width` kuwa pikseli 500. Hapa kuna sheria ya CSS inayoweka upana wa `card` ya darasa hadi pikseli 300:

```css
.card {
  width: 300px;
}
```

# --hints--

Msimbo wako unapaswa kuwa na kichaguzi cha `.canvas`.

```js
const hasCanvas = new __helpers.CSSHelp(document).getStyle('.canvas');
assert(hasCanvas)
```

Unapaswa kuweka sifa ya `width` kuwa `500px`.

```js
const hasWidth = new __helpers.CSSHelp(document).getCSSRules().some(x => x.style.width === '500px')
assert(hasWidth);
```

Kipengele chako cha `.canvas` kinapaswa kuwa na `width` ya `500px`.

```js
const width = new __helpers.CSSHelp(document).getStyle('.canvas')?.getPropertyValue('width');
assert(width === '500px');
```

# --seed--

## --seed-contents--

```css
--fcc-editable-region--

--fcc-editable-region--

```

```html
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <title>Rothko Painting</title>
    <link href="./styles.css" rel="stylesheet">
  </head>
  <body>
    <div class="canvas">
    </div>
  </body>
</html>
```
