Results 1 to 4 of 4

Thread: Menu css

  1. #1
    Ext JS Premium Member
    Join Date
    Jul 2009
    Posts
    11

    Smile Menu css

    I have a toolbar that has a button, which in turn has a menu. When the button is clicked the menu pops up and has the following css applied to it: style="position: absolute; z-index: 15000; visibility: visible; left: 5px; top: 54px;"

    Where does this style coming from? I'd like to change the left and top properties. What's the best way to do that?

  2. #2
    Sencha Premium User mrsunshine's Avatar
    Join Date
    Sep 2008
    Location
    Germany - Darmstadt
    Posts
    693

    Default

    the style is automatical calculated by extjs

    what do you want to do?

  3. #3
    Ext JS Premium Member
    Join Date
    Jul 2009
    Posts
    11

    Default

    I'd like to shift the menu so that the left edge is directly under the button. Basically setting left to something like 0px or 1px, whatever looks better.

  4. #4
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,245

    Default

    You can use the menuAlign and defaultOffsets config options to modify the menu position.

    Code:
    new Ext.Button({
    	text: 'Click me',
    	menuAlign: 'tl-bl',
    	menu: new Ext.menu.Menu({
    		defaultOffsets: [0, 0],
    		items: [{
    			text: 'Menuitem'
    		}]
    	}),
    	renderTo: Ext.getBody()
    });

Posting Permissions

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