How to left align elements in a jqmath table

こ雲淡風輕ζ 提交于 2019-12-01 23:37:24

问题


If I try to create a table in jqmath, it always centers the elements. So if I write

$$\table a , b ; c , dddddddddddd ;$$

then I get

a          b
c    dddddddddddd

How do I make jqmath align the columns to the left, so that the table is displayed as

a    b
c    dddddddddddd

回答1:


All you need to do is style the appropriate tags.

<style type="text/css">
mtd, .fm-mtd  {
    text-align:left;
}
</style>

This is demonstrated in the following fiddle.

To find out more about how to style code generated by jqMath, just look at their CSS style sheet.

jqMath behaves differently on differing browsers. By default, Chrome displays the text using left alignment, whereas Firefox displays the text using center alignment. Chrome uses <td class="fm-mtd"> while Firefox uses <mtd>. The tag used depends upon whether the web browser supports MathML.

To learn more about text-align, visit the Mozilla Developer Network.



来源:https://stackoverflow.com/questions/10965767/how-to-left-align-elements-in-a-jqmath-table

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!