I am facing an issue with a child div that has padding. When I add a border-right to the child div, how can I make it full height? Below is the code snippet:
<div class="parent">
<div class="child">
<h2>Content</h2>
</div>
</div>
.parent{
border: 2px solid black;
}
.child{
width: 25%;
border-right: 2px solid red;
}
The current output of my code: https://i.sstatic.net/OidU3.jpg
Desired result: https://i.sstatic.net/96YPz.jpg
I'm new to this, any help would be greatly appreciated. Thank you!