-
14 Oct 2009 9:48 PM #1
Internet Explorer 8, width of menu items to small
Internet Explorer 8, width of menu items to small
In IE8 (and IE8 compatibility mode) the width of my menu items is fixed (and too small); in Opera or FF the width adapts to the length of the text.
Is there anything I can do, to have a fitting length in IE also?
Wolfgang
PS: My typical code for a menu element:
------------
------------Code:{ text: 'Auswertungen', menu: new Ext.menu.Menu({ id: 'main_stat', text: 'Auswert', items: [ actionVergleich('vergleich_pp'), actionVergleich_subid('vergleich_subid'), actionVergleich_domain('vergleich_domain'), actionErfolgeAnzeigen('erfolge_monat'), actionPartnerMonatsUebersichtAnzeigen ] }) },
-
14 Oct 2009 11:32 PM #2
are you using version 2.3?
or you may need this
or upgrade your ext js version if you want.Code:Ext.override(Ext.menu.Menu, { autoWidth : function(){ var ua = navigator.userAgent.toLowerCase(); var isIE8 = !Ext.isOpera && ua.indexOf("msie 8") > -1; var el = this.el, ul = this.ul; if(!el){ return; } var w = this.width; if(w){ el.setWidth(w); }else if(Ext.isIE && !isIE8){ el.setWidth(this.minWidth); var t = el.dom.offsetWidth; // force recalc el.setWidth(ul.getWidth()+el.getFrameWidth("lr")); } } });
-
16 Oct 2009 12:39 AM #3
I'm still working with 2.2.1.
I tried your fix (it helped, of course) and will later switch to 2.3
Thanks a lot
Wolfgang


Reply With Quote