How can I make the p tag below expand to be the size of its child span? This should be relatively straight forward but I tried the usual display, overflow, etc and can't get it.
div {
margin: 5rem;
}
p {
-webkit-margin-after: 0.7rem;
margin-block-end: 0.7rem;
-webkit-margin-before: 0.2rem;
margin-block-start: 0.2rem;
line-height: 150%;
}
p {
font-size: 1rem;
}
.font-h1size {
font-size: 3.052rem;
}
<div>
<p style="border: 1px solid black;"><span class="font-h1size">The border is from the parent p tag</span></p>
</div>