Learn the CSS Box Model by Building a Rothko Painting - Step 11

Tell us what’s happening: I am strugglin to understand this question. Please help. what is that I am doing wrong?

Your code so far

/* file: styles.css */
.canvas {
  width: 500px;
  height: 600px;
  background-color: #4d0f00;
}
<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <title>Rothko Painting</title>
    <link href="./styles.css" rel="stylesheet">
  </head>
  <body>

<!-- User Editable Region -->


    <div class="canvas"></div>
    <div class="frame">
      <div class="canvas"></div>
    </div>


<!-- User Editable Region -->

  </body>

Your browser information:

User Agent is: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/119.0

Challenge Information:

Learn the CSS Box Model by Building a Rothko Painting - Step 11

Now there are two of them! You have added a second .canvas element, which is baffling the tests

Hello @MbaliPalisoMokoena !

It is just required to place the frame div around the existing canvas class div.

Happy coding!

I am still confused it still says, I should add a new div element

can you please elaborate.

Did you change your code? If so, please post your new code.

If you didn’t, try making sure you do not have to .canvas elements.

yes i did

Please post your actual code instead of pictures.

You still have two divs with a class of canvas. You can only have one.

<div class="canvas">
    </div>
    <div class="frame">
      <div class="canvas">
    </div>
    </div>

I’ve edited your code for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

I see two places that say canvas. There really, really, really, really can only be exactly 1 (one) place that says `canvas’.

hey…
I am new to coding and your responses are not helping at all. I have been trying but still gets an error.

I will wait maybe someone will explain better.

Did you change your code? If so, please post the updated code.

If you are only supposed to have one element with the canvas class, then one of the two you currently have must be removed.

We cannot write the answer for you. That’s against the rules. I’m trying to tell you what to do without just writing the answer.

<div class="canvas">
    </div>
    <div class="frame">
    </div>

That’s much closer to the answer.

But the instructions say to “wrap” the .canvas div in another div. That means that the .canvas div has to be inside of the .frame div.

Right now your .canvas div is above the .frame div instead of inside (between the tags) of the .frame div.

2 Likes

Thank you. The code passed now.

2 Likes

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