Rothko Paiting- Step 14

The Frame class and Canvas class have same width (500px) and they are parent child, so shouldn’t it overlap completely width wise? how child is contained inside parent? that means parent (frame) is changing its dimension based on child(canvas) content? I thougth px is not relative.

link - https://www.freecodecamp.org/learn/2022/responsive-web-design/learn-the-css-box-model-by-building-a-rothko-painting/step-14

Please post a link to the challenge. Thank you

Here it is - https://www.freecodecamp.org/learn/2022/responsive-web-design/learn-the-css-box-model-by-building-a-rothko-painting/step-14

"Divs usually behave like boxes within boxes, but sometimes it can be more useful to think of them as frames behind frames.

If you set the width and height of a div to 100px and the overflow to hidden, its content will be cropped to this size."

1 Like

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