Let's talk about a CSS challenge.
.parent{box-sizing: border-box; height: 60px; border: 1px solid green;}
The child div has its own styling:
.child{height:inherit;background: red}
Here is the code snippet:
.parent {
box-sizing: border-box;
height: 60px;
border: 1px solid green;
}
.child {
height:inherit;
background: red;
}
<div class="parent">
<div class="child"></div>
</div>
Now, the question arises on how to inherit height from the parent element. Is it achievable with the box-sizing: border-box property?