Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jquery-ui/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
为什么jQuery图标不能与文本对齐CSS属性对齐?_Css_Jquery Ui - Fatal编程技术网

为什么jQuery图标不能与文本对齐CSS属性对齐?

为什么jQuery图标不能与文本对齐CSS属性对齐?,css,jquery-ui,Css,Jquery Ui,我使用一些jqueryui图标作为表中的列标题。跨距没有根据文本对齐属性对齐,我还没有找到合理的解决方法 我尝试使用CSS中的text align属性和th的align属性,图标跨度不会居中。相反,它保持左对齐 HTML <th align="center" scope="col" style="width:100px;"><a href="javascript:__doPostBack('RuleGrid','Sort$5')"><span class="ui-s

我使用一些jqueryui图标作为表中的列标题。跨距没有根据文本对齐属性对齐,我还没有找到合理的解决方法

我尝试使用CSS中的
text align
属性和
th
align
属性,图标跨度不会居中。相反,它保持左对齐

HTML

<th align="center" scope="col" style="width:100px;"><a href="javascript:__doPostBack('RuleGrid','Sort$5')"><span class="ui-state-default ui-icon ui-icon-locked"></span></a></th>

我有一本书来描述这个问题

这似乎只是IE中的一个问题,chrome和firefox正确地呈现了它。 您可以删除span标记,只需将类放在a标记上即可。我刚刚添加了样式“margin:0auto”,它解决了IE中的问题

干杯

<th scope="col" align="center" style="width:100px;">
    <a href="javascript:__doPostBack('RuleGrid','Sort$5')" class="ui-state-default ui-icon ui-icon-locked" style="margin:0 auto"/>
</th>

这似乎只是IE中的一个问题,chrome和firefox正确地呈现了它。 您可以删除span标记,只需将类放在a标记上即可。我刚刚添加了样式“margin:0auto”,它解决了IE中的问题

干杯

<th scope="col" align="center" style="width:100px;">
    <a href="javascript:__doPostBack('RuleGrid','Sort$5')" class="ui-state-default ui-icon ui-icon-locked" style="margin:0 auto"/>
</th>


尝试文本对齐:居中;在跨度上itself@DavidB跨距上的élanger
text align center
也不起作用。我也尝试过文本对齐:居中;在跨度上itself@DavidB跨距上的élanger
text align center
也不起作用。我也试过了