div {
display: inline;
}
.sub1{
vertical-align: sub;
font-size:x-small;
}
<div>H</div>
<div >2</div>
<div>O</div>
Problem is the letter space between H, 2(subscript), 0 renders high and I wanna compact the letter spacing more.
I can't use letter-spacing less than 1 px as it is not effective.
CodePudding user response:
Write in one div
and only wrap 2
in span
div {
display: inline;
}
.sub1{
vertical-align: sub;
font-size:x-small;
}
<div>
H<span >2</span>O
</div>