How To Represent Fractions In Html
I want to represent fractions in html and the code I am using now is this: 3⁄8 And it looks like this: But I want to repre
Solution 1:
It is not possible through pure HTML. But you can create that type of fraction using a bit of CSS.
.fraction {
position: relative;
width: 1em;
font-size: 2em;
}
.numerator {
border-bottom: 2px solid black;
text-align: center;
}
.denominator {
border-right: 2px solid black;
width: 0.75em;
text-align: center;
}
<divclass="fraction"><divclass="numerator">3</div><divclass="denominator">8</div></div>
Post a Comment for "How To Represent Fractions In Html"