-
4 Oct 2007 7:56 AM #1
[Solved] [2.0a1] Ext.Panel doesn't show the style.
[Solved] [2.0a1] Ext.Panel doesn't show the style.
My style doesn't work with the panel, when updating it through CSS.
Code:#north, .status{ font:normal 8pt arial, helvetica; } .status { padding:4px; background-color: #C3DAF9; }If I code with the html tag like this, with <div class="status"></div>, it works.Code:new Ext.Panel({ // raw region:'south', el: 'status', id: 'statusPanel', split:false, border: false, //cls :'status', //This doesn't work! html: '<div class="status">Welcome to the CMS panel!</div>', //Works height:24, margins:'0 0 0 0' }),
When I declare the 'status', it doesn't work.
This is the updating line I use for the panel:
MainPanel.statusPanel.body.update('Updating....'); //No style
MainPanel.statusPanel.body.update('<div class="status">Updating....</div>'); //Yes style
Any ideas?
That's a bug I should report? Normal Ext-JS 2 behavior?Last edited by Yossi; 5 Oct 2007 at 1:18 AM. Reason: Marked thread solved.
-
4 Oct 2007 9:41 AM #2
I don't know how this could be a bug in Ext considering Ext doesn't control CSS specificity. You will need to apply rules that match the target. e.g.
#north .x-panel-body {
// your font
}
-
5 Oct 2007 1:16 AM #3
[Solved] checked out the generated HTML:
[Solved] checked out the generated HTML:
<div style="left: 0px; top: 452px; width: 1068px;" class="x-panel status x-border-panel x-panel-noborder" id="status"><div id="ext-gen66" class="x-panel-bwrap"><div style="height: 30px; width: 1060px;" id="ext-gen67" class="x-panel-body x-panel-body-noheader x-panel-body-noborder"><div class="status">Welcome to the CMS panel!</div></div></div></div>
Changed the CSS as suggested.
Didn't know that's the way to use the CSS in Ext 2.0a1,Code:.status .x-panel-body { padding:4px; background-color: #C3DAF9; }
thank you.
-
5 Oct 2007 9:57 AM #4
Sencha Docs / Ext 3.x - ( Docs | Examples )
Learning Center / Saki's Examples (for 2.x) / HOWTO - ( Report Bugs | Post Proper Code )


Reply With Quote