HTML Fraction
<style>
.frac {
display: inline-block;
position: relative;
vertical-align: middle;
letter-spacing: 0.001em;
text-align: center;
}
.frac > span {
display: block;
padding: 0.1em;
}
.frac span.bottom {
border-top: thin solid black;
}
.frac span.symbol {
display: none;
}
</style>
<div class="frac">
<span>1</span>
<span class="symbol">/</span>
<span class="bottom">2</span>
</div>
·
<div class="frac">
<span>3</span>
<span class="symbol">/</span>
<span class="bottom">4</span>
</div>
I saw this trick on stackoverflow by user lokesh. It will display:
1
/
2
·
3
/
4