I would like to write a fraction using HTML / CSS / jQuery (instead of using TeX or even MathML rendering). At the moment there is a great solution for writing simple fractions, which works if you have one term for the numerator and denominator, but as soon as you start using more than one term, it looks pretty terrible. For example, using:
<sup><font size=-2>x<sup>2</sup> + 3x + 5</font></sup>/<sub><font size=-2>2x</font></sub>
produces ...
x 2 + 3x + 5 / 2x
What I need is a beautiful horizontal line to determine the fraction, not the backslash. I tried using tags divwith border-bottomas such, but the output is still pretty terrible:
<div style="float:left;">Substitute 4 for 'x' in the equation: </div>
<div style="float:left">
<div style="border-bottom:1px solid;font-size:small;text-align:center;">x<sup>2</sup> + 3x + 5</div>
<div style="font-size:small;text-align:center;">2x</div>
</div>
produces ...

I am looking for an HTML / CSS / jQuery snippet that ...
? ? !