+ -
当前位置:首页 → 问答吧 → extjs combox 使用了样式后,下拉箭头与文本框错位显示

extjs combox 使用了样式后,下拉箭头与文本框错位显示

时间:2011-04-12

来源:互联网

以下是部分代码
new Ext.form.ComboBox({  
fieldLabel: '时间',
name: 'time',
hiddenName: 'time',  
xtype: 'combo',
  style:{marginTop: '2px'}
  })
结果发现combox中的文本框和下拉框不在一个水平线上了……这可咋整啊

作者: toss2000   发布时间: 2011-04-12

设置父容器的对齐方式,如果没有父容器可以在treeview 两端加<div style="text-align:left"></div> 

如下:

<div align="center" style="margin:0px auto; border:solid 1px blue; text-align:left">
  <asp:TreeView ID="TreeView1" runat="server" DataSourceID="XmlDataSource1" Font-Size="12px" ForeColor="Black" ShowLines="True" BorderColor="Red" BorderWidth="1" style="margin:0px auto; ">
  </asp:TreeView>
  </div>
你试试,希望可以帮到你

作者: Rose870705   发布时间: 2011-04-12