---
id: 684d009994a3840b98c9aa3a
title: Step 8
challengeType: 0
dashedName: step-8
---

# --description--

Right now, the width of the `div` element spans the entire width of the page. To apply widths in Tailwind CSS, you have a few options, like using the `w-number` pattern for fixed widths or `w-fraction` pattern for percentages.  

Here is an example of applying a width set to `66%` of its parent container:

```html
<p class="w-2/3">This is a percentage width.</p>
```

Inside your opening `div` tag, apply a width set to `50%` of its parent container.

# --hints--

Your opening `div` tag should have the `w-1/2` utility class.

```js
const divEl = document.querySelector("div");
assert.isTrue(divEl.classList.contains("w-1/2"));
```

# --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>Error Message Component</title>
    <script src="https://cdn.tailwindcss.com"></script>
  </head>
  <body>
    --fcc-editable-region--
    <div class="bg-red-100 border-2 border-red-300 rounded-md">
    --fcc-editable-region--
      <p>
        <strong>Error!</strong> Something went wrong. Please try again.
      </p>
      <button aria-label="Dismiss">
        <span aria-hidden>&times;</span>
      </button>
    </div>
  </body>
</html>
```
