user3233787 user3233787 - 1 month ago 6x
CSS Question

HTML tag or CSS Text Format Text Same Height

I would like to achieve this text format.

<p>you 10 oz bottle</p>

enter image description here

The text number "10" and text "oz" has same height. Is there anyway to achieve this? Or do I need some fonts to achieve this text format? Can someone please help me. Thanks in advance.


Wrap your the number in another element you can target to adjust the font-size accordingly. Or simply wrap it in small tags.

<span>You have <small>10</small> oz bottle</span>

<span>You have a <small>10</small> oz bottle</span>