View Full Version : [CLOSED] LabelAlign bug

20 Oct 2010, 12:15 AM
Ext version tested:

Ext 3.3.0

Adapter used:


css used:

only default ext-all.css

Browser versions tested against:


Operating System:



labelAlign (http://dev.sencha.com/deploy/dev/docs/source/Form.html#cfg-Ext.form.FormPanel-labelAlign) : String
The label alignment value used for the text-align specification for the container. Valid values are "left", "top" or "right" (defaults to "left"). This property cascades to child containers and can be overridden on any child container (e.g., a fieldset can specify a different labelAlign for its fields).
In according to the ExtJS docs I'm expecting another view.
Please see code and a screen-shot.

Test Case:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title id='title'>FormPanel LabelAlign Issue</title>
<!-- ** CSS ** -->
<!-- base library -->
<link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
<link rel="stylesheet" type="text/css" href="resources/css/ext-all.css" />
<!-- ** Javascript ** -->
<!-- base library -->
<script type="text/javascript" src="adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="ext-all-debug.js"></script>
<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="../../ext-all-debug.js"></script>
<script type="text/javascript">
Ext.BLANK_IMAGE_URL = '../../resources/images/default/s.gif';

new Ext.form.FormPanel({
labelAlign: "top",
renderTo: Ext.getBody(),
items: [{
xtype: "textfield",
fieldLabel: "Top"
}, {
xtype: "container",
labelAlign: "left",
layout: "form",
items: {
xtype: "textfield",
fieldLabel: "Left"
The result that was expected:

Please see the attached screen-shot.

20 Oct 2010, 12:32 AM
This is a very old bug.

Due to css limitations it's not possible to nest labelAlign:'left' or 'right' inside a labelAlign:'top' container.

As a workaround you could make the formpanel labelAlign:'left' and include the 'Top' field in a separate container with layout:'form' and labelAlign:'top'.

20 Oct 2010, 12:48 AM

Thank you for the reply and the suggestion. It works.

By the way now I see similar threads but was unable to find them using "Search".

Is there anything like "Advanced search" on the forum?

20 Oct 2010, 12:57 AM
The 'Search' feature will normally do "Search Multiple Content Types". I don't know what the trouble is with this kind of search, but I never seem to find what I'm looking for.

I recommend using Single Content Type search instead:
- Click "Advanced Search" the bottom of this page.
- Next, click on the "Search Single Content Type" tab.
- Bookmark this page.

If you search in the 2.x Bugs section for "labelAlign" you would find this post (http://www.sencha.com/forum/showthread.php?25350-2.0.1-labelAlign-is-inherited-from-topmost-form).

20 Oct 2010, 1:11 AM
Thank you again.

I don't know what the trouble is with this kind of search, but I never seem to find what I'm looking for.