Aligning text in an HTML math table

1 day ago 1
ARTICLE AD BOX

I'm having trouble aligning the text inside a HTML math table.

If you run the code snippet below, you'll see a simple table with two rows, each made up of two columns. My question is, how can I right align the text in the left column?

Left aligning the text in the right column was just a matter of adding text-align: left to the right <td> element. However, when I add text-align: right to the left <td>, to my surprise, it changes the alignment from center to left, not right.

.math_td_left { text-align: right; } .math_td_right { text-align: left; } <math> <mtable> <mtr> <mtd class="math_td_left">a + 7</mtd> <mtd class="math_td_right"> = b</mtd> </mtr> <mtr> <mtd class="math_td_left">c</mtd> <mtd class="math_td_right"> = d - 8</mtd> </mtr> </mtable> </math>
Read Entire Article