Little help with html and css

Hello guys, i need a little help for html and css stuff

i create 3 div,
container
header
menl

how can you see, if i put the div menl inside the div header,it’s all ok but

if i put the div only inside the div container he got outside the border, why? on the div header he stay good, without problem aboute the height

You’re setting height to 100%. Which means 100% of the parent container. In other words, however tall my parent is, that’s how tall I’m going to be.

In the first example, when menl is nested inside header, you’re saying “I want menl to be 100% the height of header”. No problem here.

In the second example you’re saying “I want menl to be 100% the height of container”. However, in this case, header is pushing the menl element down the page - roughly 10% of container. But, menl is still set to be 100% the height of it’s parent, which is container. The result is menl is indeed 100% the height of it’s parent, it’s just positioned a little lower.