How can I fit the 2 child elements (blue border) to fit perfectly within the parent (black border) without having to adjust the height?
My code:
<html>
<head>
<style>
.parent {
border: 3px solid black;
height: 500px;
}
.child {
border: 3px solid blue;
height: 50%;
margin: 2% 1%;
}
</style>
</head>
<body>
<div class="parent">
<div class="child"></div>
<div class="child"></div>
</div>
</body>
</html>