>> This is far to complex. In maths, a fraction 3 over 2 is also 
>> the same 
>> as 3 divided by 2. This markup and CSS does this.
>> 
>> <sup>3</sup>/<sub>2</sub>
>> 
>> -- 
>> Alan http://css-class.com/
>I run your code and saw your demo, but I wanted a horizontal line.

I took Alan's sample and expanded on it to provide a horizontal line.  I
haven't extensively tested it but it works well for me on FF3.5.

.fraction {
  line-height:160%;
  display: inline-block;
  vertical-align: middle;
}
.fraction .divider {
  color: transparent;
  float: left;
  clear: left;
  border-top: 1px solid black;
  width: 100%;
  line-height: 0;
  height: 0;
}
.fraction sup, .fraction sub {
  font-size:75%;
  float: left;
  clear: left;
}

<span class="fraction"><sup>3</sup><span
class="divider">/</span><sub>2</sub></span>

Mark
______________________________________________________________________
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to