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

How to Wrap the .canvas element in another div . Give that div the frame class?

/* 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"> <.canvas></.canvas></div>
    


<!-- User Editable Region -->

  </body>

Your browser information:

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

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

Link to the challenge:

You have to add div element before your first div. you first div of class canvas should be nest in new div class of frame.

1 Like

Welcome to the community!
Here is an example I hope will help you understand the necessary code solution.

< div class=“xyz”>
< div class=“abc”>
< /div>
< /div>

The original < div class abc> has been nested within the < div class xyz>.

Happy coding.

1 Like

Thank you very much. it got solved.

1 Like

Thank you very much…

1 Like

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