对齐文字问题 [英] Align Text issue
本文介绍了对齐文字问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一张表格,用过。在Internet Explorer中,表单正确呈现。但是在Chrome和Mozilla中,文本格式不正确。见图。我有一个使用的代码。见下文。有人可以协助吗?
< script src =" https://code.jquery.com/jquery-1.12.4.min.js"类型= QUOT;文本/ JavaScript的">< /脚本>
< script type =" text / javascript">
$(function(){
$(&#;#WebPartWPQ2 table table tr> td> div:contains('Tech Notes')")。nearest('tr')。hide();
$ .ajax({
url:_spPageContextInfo.webAbsoluteUrl +" / _ api / web / sitegroups / getByName('IMOMembers')/ Users?$ filter = Id eq" + _spPageContextInfo.userId,
方法:"GET",
标题:{"接受":" application / json; odata = verbose"},
成功:函数(数据){
if (data.d.results.length!= 0){
$(&#;#WebPartWPQ2 table table tr> td> div:contains('Tech Notes')")。nearest('tr')。show ();
}
}
});
});
< / script>
< style>
.alignCenter {
text-align:-moz-center!important;
}
.alignRight {
text-align:-webkit-center!important;
}
< / style>
Lee Mossolle
解决方案
您可以尝试为td / tr元素添加适当的宽度样式然后检查。
如果存在问题,请尝试分享更多详细信息(这个问题我们可以尝试研究/测试。
最好的问候,
Lee
I Have a form, that is used. In Internet Explorer the form renders correctly. However in Chrome and Mozilla, the text is incorrectly formatted. See image. I have a code that is used. See below. Can someone assist?
<script src="https://code.jquery.com/jquery-1.12.4.min.js" type="text/javascript"></script> <script type="text/javascript"> $(function () { $("#WebPartWPQ2 table table tr>td>div:contains('Tech Notes')").closest('tr').hide(); $.ajax({ url: _spPageContextInfo.webAbsoluteUrl + "/_api/web/sitegroups/getByName('IMOMembers')/Users?$filter=Id eq " + _spPageContextInfo.userId, method: "GET", headers: { "Accept": "application/json; odata=verbose"}, success: function(data){ if(data.d.results.length!=0){ $("#WebPartWPQ2 table table tr>td>div:contains('Tech Notes')").closest('tr').show(); } } }); }); </script> <style> .alignCenter { text-align: -moz-center!important; } .alignRight { text-align: -webkit-center!important; } </style>
Lee Mossolle
解决方案
Hi,
Could you try to add proper width style to the td/tr element and then check.
If issue exists, try to share more details(where the script you used for customization) for this issue so we could try to research/test.
Best Regards,
Lee
这篇关于对齐文字问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文