PDA

View Full Version : the menu's shortcut key position



goodlook
17 Aug 2009, 11:45 PM
I encounter a little problem:


var menu = new Ext.Menu({
item:[{
text:'Menu1<span style="text-align:right">Ctrl + G</span>'
}]
});

The shortcut key is added to the menu item, but the "text-align:right" not work.
Except adding space between the "Menu1" and the "Ctrl + G", is there any better way ?

Stoot98
18 Aug 2009, 12:55 AM
That Span is only going to be as long as the string "Ctrl + G" and so right aligning it isn't going to do much. You will need to float the span right.

goodlook
18 Aug 2009, 4:34 PM
That Span is only going to be as long as the string "Ctrl + G" and so right aligning it isn't going to do much. You will need to float the span right.

Thanks.As you tell me, I tried serval times, and it works. My menu text is like this:



<span style="width:120px"><span style="float:left">Menu1</span><span style="float:right;">Ctrl+G</span></span>


it must be wrapped by a span