Learn Basic CSS by Building a Cafe Menu - Step 24

Hello, I need to know what´s wrong with my code. I set the value to 240px and the code don´t pass. Thanks.

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
    <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"/>
        <h1>CAMPER CAFE</h1>
        <p>Est. 2020</p>
/* file: styles.css */
body {
  background-color: burlywood;

h1, h2, p {
  text-align: center;
div {
  width: 240px;

  background-color: burlywood;

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36

Challenge: Learn Basic CSS by Building a Cafe Menu - Step 24

Link to the challenge:

Let’s look at the instructions again

Currently, the width of the div element is specified in pixels (px ). Change the width property’s value to be 80% , to make it 80% the width of its parent element (body ).

They say you need to change the width from pixels (px) to a percentage (%).

Your width is in pixels, it should be a percentage.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.