@Eileenpk
Posted
Hi Julio-souto, your project looks good.
To answer your question regarding how you used fixed heights, I see that you used
body{ height: 100vh; }
and percentages to set the height and width of the children's elements.
In CSS, percentages used for height and width are not considered fixed values, but rather relative to the size of the parent element.
When you use a percentage value for the height or width of an element, the size of the element is calculated based on the size of its parent element. For example, if you set the height of an element to 50%, the element will be half the height of its parent element.
This means that the size of the element can change depending on the size of its parent element. If the size of the parent element changes, the size of the child element will change proportionally.
In contrast, fixed values for height and width, such as pixels or inches, are not relative to the parent element and will not change based on the size of the parent.
Hope you found this helpful!
- Let's connect on LinkedIn! - @Eileenpk
Marked as helpful