PDA

View Full Version : Why ExtJS defines css for almost all html elements?



leandrorc
29 Jun 2008, 3:05 PM
Hi there,

Today i used the Ext.window in a html page to show news inside it, and i will use another Ext components. But i saw that by including ext-all.css, some things in the page have changed. And i'm disappointed about this! Because ext-all.css defines css for almost all html elements. Ext define, for example, that [html, body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, form, fieldset, input, p, blockquote, th, td] will have margin and padding equal to zero! These things are really bad! Why ExtJs do that? In pure ExtJs applications it's not so bad, but it breaks our site layouts!

Is there any solution?

29 Jun 2008, 3:12 PM
it's probably the Reset, which helps level the playing field for CBC. I would suggest recoding your CSS so it is not broad.

danh2000
29 Jun 2008, 5:15 PM
As Jay said, scope your css to be specific - the greater the specificity, the higher prcedence the rule receives - you should therefore be able to supercede the reset rules by being very specific with your own css.

Additionally, the is due to be addressed in Ext 3 - all css will be scoped to Ext components only.