BananaMaster

6 How %, vw and vh Work in CSS (HTML and CSS, Front End)

If you forgot something, click to go to the lesson

📘 Practical Tasks: %, vw, vh

For each task create separate classes in style.css and apply them to the correct tags.

📌 File structure: index.html + style.css

✏️ Task 1

Recreate the block. Estimate the parent's size by eye:

✏️ Task 2

Recreate the block. Estimate the parent's size by eye:

✏️ Task 3

Recreate the nested blocks. Estimate the parent's size by eye:

✏️ Task 4

Three child blocks stand in a column and divide the parent's height. Estimate the parent's size by eye:

✏️ Task 5

The parent depends on the browser window, two children stand in a column. Estimate the values by eye:

✏️ Task 6

The parent depends on the browser window, three children stand in a column. Estimate the values by eye:

✏️ Task 7

Parent depends on the window, child depends on the parent. Estimate the values by eye:

✏️ Task 8

Parent depends on the window, child depends on the parent. Estimate the values by eye:

✏️ Task 9

Three levels: parent from the window, each child from its own parent. Estimate the values by eye:

✏️ Task 10 — 🔥 Bonus

Three child blocks stand in a column inside a parent. Estimate the values by eye:

📌 Important:
Each class is written separately in style.css.
Use HTML and CSS only.
Practice the units: %, vw, vh.