PDA

View Full Version : Ext JS in a CMS overrides CSS



zoggo
16 May 2012, 6:49 AM
Hi there,

We produced a very fine Map-Application with Ext JS. All our scripts and stylsheet are loaded dynamicly by Java Script. The HTML Header just need one js-File and one line of code to load the whole App. Our goal is to implement this App as an Object in a existing CMS. So, first the CMS is loading themselfe and finaly loads our App as a part of the CMS content. But now Ext JS overrides CSS rules from the CMS and that should no happen. Our App is bound to a div. So my question is how can I bound Ext JS to just this DIV (and the Objects below) and not to the whole body?

thanks for every hint

Urs

fschaeffer
17 May 2012, 8:38 PM
You could either use an iFrame in your CMS so the Ext-CSS won't interfere with your application or you could use the scoped Ext-CSS.

It is also included in your Ext distribution, folder resources/css/ext-all-scoped.css and can be activated using
Ext.scopeResetCSS=true

HTH
Florian

zoggo
23 May 2012, 1:21 AM
Hi Florian

The scoping works great. It's exactly what we were looking for!

Thanks a lot.

Urs