First, the line-height effect only depends on inline elements. When a row-height is applied to a block , an inline block, or any other type of element that is not inline, it is used only for inline stream elements .
Secondly, in a linear line (an abstract block containing inline elements in a line), all inline elements are aligned along the baseline. When you change the line height for the second div, it adds half the leading line at the top (and bottom) of this inline element. And the upper half leads pushing the base level lower, which in turn moves the first div below.
I'm not quite sure what you are trying to achieve, but I would recommend using the vertical-align property or just using the relative position.
Vishal gupta
source share