...

View Full Version : Fractions



Murphie
12-16-2002, 03:23 AM
Is there any way to get fractions (other than 1/4, 1/2. and 3/4) to display properly? It looks bad to have some going sideways and some up and down... Thank you!
Murphie

jkd
12-16-2002, 04:26 AM
<mfrac>
<mn> 1 </mn>
<mn> 2 </mn>
</mfrac>

That's presentation MathML, something which only Mozilla and Amaya support natively.

The best you can do with HTML is:

<sup>1</sup>/<sub>2</sub>

Murphie
12-16-2002, 03:22 PM
Well, that's better than nothing--is there anyway to make it smaller? I tried <small> but it's still bigger than I would like. I'm sorry, I'm just a beginner! Thank you!
Murphie

Mhtml
12-17-2002, 05:19 AM
You could try wrapping it in a <p> tag and using css...

example;


<style>
.fraction {
font-size:8pt;
}
</style>
<p class="fraction"><sup>1/2</sup></p>

Murphie
12-20-2002, 07:19 PM
Thank you! Will try, out of time now...

hrsdh
12-30-2002, 12:31 AM
Hi,

Another possible approach which could be used with the more common fractions would be to use a character entity - e.g.

&quot;&amp;frac12;&quot; for a half,
&quot;&amp;frac14;&quot; for a quarter,
etcetera.

Cheers,
Stuart.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum