如何左对齐jqmath表中的元素 [英] How to left align elements in a jqmath table

查看:75
本文介绍了如何左对齐jqmath表中的元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我尝试在 jqmath 中创建表,它将始终将元素居中.所以如果我写

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

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

然后我得到

a          b
c    dddddddddddd

如何使jqmath的列向左对齐,以使表显示为

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

a    b
c    dddddddddddd

推荐答案

所有您需要做的就是设置适当标签的样式.

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.

要了解有关如何设置jqMath生成的代码样式的更多信息,只需查看其 CSS样式表.

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

jqMath在不同的浏览器上的行为有所不同.默认情况下,Chrome使用左对齐显示文本,而Firefox使用居中对齐显示文本.Chrome使用< td class ="fm-mtd"> ,而Firefox使用< mtd> .使用的标记取决于网络浏览器是否支持MathML .

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.

要了解有关 text-align 的更多信息,请访问 Mozilla开发者网络.

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

这篇关于如何左对齐jqmath表中的元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆