Wolfie7873
Technical User
So I'm trying to put some math on a webpage, and fractions can be a right pain. I came up with the following.
table {
display: inline;
border-collapse: collapse;
vertical-align: middle;
}
table td {
text-align: center;
}
table td .num {
border-bottom: 1px solid black;
}
Then:
<table>
<tr>
<td class=num>numerator goes here</td>
</tr>
<tr>
<td>denominator goes here</td>
</tr>
</table>
This works great in Opera and IE, but not in FF. Something about trying to set the display inline makes the text centering fail and it just flat out refuses to do the vertical alignment. Anyone know of a workaround?
Thanks in advance
table {
display: inline;
border-collapse: collapse;
vertical-align: middle;
}
table td {
text-align: center;
}
table td .num {
border-bottom: 1px solid black;
}
Then:
<table>
<tr>
<td class=num>numerator goes here</td>
</tr>
<tr>
<td>denominator goes here</td>
</tr>
</table>
This works great in Opera and IE, but not in FF. Something about trying to set the display inline makes the text centering fail and it just flat out refuses to do the vertical alignment. Anyone know of a workaround?
Thanks in advance