Results 1 to 2 of 2

Thread: Form labels aligned incorrectly when inside box layouts

    Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Sencha User
    Join Date
    Mar 2007
    Vote Rating

    Default Form labels aligned incorrectly when inside box layouts


    Ext version tested:
    • Sencha Touch 2.2

    Browser versions tested against:
    • Chrome for Mac 26.0.1410.65

    DOCTYPE tested against:
    • html

    • If you put a form field with labelAlign=left inside a container with layout=hbox or vbox, the label will appear on top of the field.

    Steps to reproduce the problem:
    • Load the example below

    The result that was expected:
    • Label is on the left

    The result that occurs instead:
    • Label is on top

    Test Case:

    Ext.create('Ext.Container', {
    	fullscreen: true,
    	layout: 'hbox',
    	items: [{
    		xtype: 'selectfield',
    		label: 'Test',
    		options: [
    			{text: 'One', value: '1'},
    			{text: 'Two', value: '2'}
    		value: '1'


    Screenshot or Video:
    • N/A

    See this URL for live test case: N/A

    Debugging already done:
    • If you change the layout to 'fit', it works correctly. Ironically, it seems like the cause of this problem is in touch/resources/themes/stylesheets/sencha-touch/base/src/layout/_Fit.scss:
      .x-stretched.x-container {
          @include st-box-orient(vertical);
      If I disable the resulting "-webkit-box-orient" rule, it fixes the alignment. But I'd love to know a workaround that doesn't involve such a global style change, if there is one.
    • There's another rule in touch/resources/themes/stylesheets/sencha-touch/base/src/layout/_Box.scss:
      .x-layout-box {
          > .x-layout-box-item {
              @include st-box(important);
      In 2.1.1, this rule used to take precedence over the previous one. And that seemed to correct the problem. But in 2.2, it doesn't.

    Possible fix:
    • not provided

    Additional CSS used:
    • base theme

    Operating System:
    • Mac OS 10.8.3

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Gainesville, FL
    Vote Rating


    This has already been fixed for the next release.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    Learn BBCode and use it!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2

    Think my support is good? Get more personalized support via a support subscription.

    Need more help with your app? Hire Sencha Services

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts