I have a container with vertically stacked items.
<div> <div>line 1</div> <div>line 2</div> <div>line 3</div> <div>line 4</div> </div>
I want the baseline of the container to be identical to the baseline of a particular one of its elements, letβs say, the third. It should look like this:

How to do it using CSS?
As a related question, how is the base level of such a container with vertically stacked elements usually determined?
I want to provide this container with the display: inline-block property. This container appears next to other elements on the line, and I want them to be aligned according to the baseline.
source share