Within this straightforward CSS snippet, my goal is to align the bottom of h1
with the bottom of p
, without having h1
display below p
.
<div id="sqrs" style="width:200px; height:200px; border:1px solid BLACK;">
<p style="width:100px; height:100px; background-color:BLUE; float:right;">blue</p>
<h1 style="background-color:YELLOW; margin-top:100px;">yellow</h1>
</div>
The style of p
cannot be altered and I do not have knowledge of the exact height
of h1
(as it can vary between different heading elements).
I attempted using margin-top:100%
instead of margin-top:100px
, but this did not provide a solution either.
Thank you,