Sent by Jukka K. Korpela on 2 September 2003 20:08
On Tue, 2 Sep 2003, Lars Bruzelius wrote:
> There must be a simpler way to do proper vulgar fractions in general with
> CSS.
I'm afraid there isn't. If you just use an element that encloses an
expression like 1/3, you would still be unable to refer to its parts in
CSS. Hence you would effectively need markup for the numerator and
denumerator separately. Your message however made be realize that <sup>
and <sub> are probably somewhat better than <span> with class - they imply
some default rendering, and they are more concise. I'm not totally happy
with the default effect of <sub>, though. In any case, if you use <sup>
and <sub>, I think you should always set both vertical-align and font-size
for them in CSS.
In theory, you could simply use the FRACTION SLASH character in the
document and let browsers handle it. According to the Unicode standard,
programs are more or less expected to do their best to render fractions
presented that way. But in practice, you'll be lucky if they don't
thoroughly mess up the rendering.
So if the fraction rendering matters, the best we can do is to use verbose
markup and try to simulate good rendering algorithms.
--
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/