beforeShowForm左对齐

beforeShowForm左对齐

本文介绍了jqGrid FormEditing beforeShowForm左对齐的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的模式FormEditing窗口居中显示.

My modal FormEditing windows appears centered.

为了克服这个问题,我使用了

In order to overcome this, I have used

 beforeShowForm: function(formId) {
     $(formId).attr('align', 'left');
 }

这在Chrome浏览器中工作正常,但在Firefox中无法正常工作.有比使用beforeShowForm更好的主意吗?我错过了用于设置对齐方式的属性吗?

This works fine in Chrome, but not in Firefox. Any better idea than using beforeShowForm? Have I missed a property for setting the alignment?

推荐答案

似乎您有一些CSS冲突.一些CSS应用于编辑表单,这些表单是为HTML页面上的另一个绝对位置创建的.这是我看到的唯一原因.您必须本地化应用在表单上的样式并更改其定义,以使其不会应用在jqGrid上.或者,您可以添加另一个更精确的样式来覆盖样式.请参阅答案,以获取封闭问题的示例.您可以使用Internet Explorer的开发人员工具(按启动),Google Chrome浏览器的开发人员工具,Firebug或其他工具来分析应用于表单的样式.

It looks like you have some CSS conflicts. Some CSS are applied on the edit form, which are created for absolute another place on your HTML page. It's the only reason which I see. You have to localize the style which are applied on the form and change it definition so that it will be not applied on jqGrid. Alternatively you can add another more exact style which overwrite the styles. See the answer for an example of close problems. You can use Developer Tools of Internet Explorer (press to start) Developer Tools of Google Chrome, Firebug or other tools to analyse the styles applied on the form.

这篇关于jqGrid FormEditing beforeShowForm左对齐的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-31 01:47