Home › Forums › CSS › Align text both left and right on the same line, but use different font-sizes. › Reply To: Align text both left and right on the same line, but use different font-sizes.
bearhead, not bad, but I see two issues:
First one is that you always have to calculate smaller text height and margin based on the bigger text.
Second one is that i’ve found inconsistent behavior when using floats for em’s, like
font-size: .7em; and ‘margin-top: 1.3em;’ don’t seem to align the lines correctly. I don’t know why.
Senff, also nice solution and one the first ones i thought about, but other than having always to know the font-sizes of both texts, I don’t really understand the formula behind
height for the right text. Can you give more explanation as to what ratio should be kept in relation to the main text font-size?