View Full Version : Set Ext.window.Window height and width via CSS

10 Apr 2013, 10:08 AM
Is there a way to set the height and width of the Window using CSS? The values I set on my class just get overridden by element.style attributes. If I attempt to set them using max-height/width or use !important the window is not laid out correctly.


12 Apr 2013, 9:53 AM
The window class will manage its height using its layout + the size of its child components.

Or, you can set the height (http://docs.sencha.com/ext-js/4-2/#!/api/Ext.window.Window-cfg-height) and width (http://docs.sencha.com/ext-js/4-2/#!/api/Ext.window.Window-cfg-width) manually.

29 Oct 2014, 5:50 AM
I need to override the window height by using CSS.

I have declared a class style 'allWindows' in my external css.
height: 640px;

I had set the cls property for my window as 'allWindows'
But it is not overriding the default height.

I need to override the default height.
How can i achieve this in CSS?

29 Oct 2014, 1:54 PM
I would not recommend setting component dimensions via CSS.
Instead you can extend Ext.window.Window giving it a set height and then instantiate your derived class. See the Fiddle below for an example: