PDA

View Full Version : Add CSS to Panel



christ1an
29 Jun 2007, 2:11 AM
Hello,

i have a little problem: i want to remove the border defined for all content-panels for exakt one panel that is autogenerated by Ext:


<div id="ext-gen71" class="x-layout-panel x-layout-panel-north" style="height: 28px; left: 0px; top: 0px; width: 1278px;">

how can i overwrite the border: 1px (only for THIS panel), that is defined by x-layout-panel? Can i add some style-attribute or css-class? is there another possibility?

after i haven

franzisk
29 Jun 2007, 3:20 AM
You can try this, at least I use it and works for me:

Ext.get('panel_id').applyStyles({border:'none'});

liggett78
29 Jun 2007, 4:00 AM
You can try this, at least I use it and works for me:

Ext.get('panel_id').applyStyles({border:'none'});

Since id is auto-generated, this would not work. I suppose you have only one north-panel in your app, so you can assign border: none for #x-layout-panel-north in your CSS definitions.

christ1an
29 Jun 2007, 5:13 AM
Since id is auto-generated, this would not work. I suppose you have only one north-panel in your app, so you can assign border: none for #x-layout-panel-north in your CSS definitions.

Thank you, right, that was the problem, so i ve done it this way, now:


//remove the border from the north-panel!
this.layout.regions.north.getEl().applyStyles({border:'none'});

might be optimizable, but its working :)