Issue with CSS Inheritance in ExtJS

I'm facing CSS issues when using EtxJS to power some screens. My application is quite complex (EtxJS embeded into Symfony2, calling Sonata's interfaces with AJAX) but I've found a simple example to show you the problem.

In fact, I have a layout with three parts. The middle part is filled with AJAX requests.

Ext.Ajax.request({
    url: 'some/url/there',
    method: 'GET',
    success: function(response) {
    Ext.getCmp('centerregion').update("<div><td class='test'>test</td></div>");
    },
    failure: function(response, opts) {
      console.log('server-side failure with status code ' + response.status);
    }
});

The class is powered by a custom css. This css is loaded fine.

.test
{
color: red;
}

When I load the page, the "test" text is not displayed in red.

If I change the response request like this :

Ext.getCmp('centerregion').update("<div class='test'>test</div>");

The "test" text is displayed in red, so it's working. The problem seems to be coming from the < tr > tag. When inspecting the text element with Firebug, the css used is my custom one if just between < div >. When the text is inside < tr >, the class used is

.x-panel-body-default { 

from ExtJS CSS, and my own CSS is not even appearing in the debug toolbar.

I really don't know why, but this is really annoying. I tried to add my custom class to ExtJS CSS but it's not working. I heard about .x-reset but there is none in the ExtJS CSS. The problem is that the AJAX request is supposed to load a more complex html file using custom CSS, and no style is applied to such pages because (I think) of the inheritance.

Someone knows a workaround to get rid of this ? Thanks :-)

Answers


Need Your Help

Android: SimpleCursorAdapter with ListView - Put multiple fields from DB into TextView

android listview cursor adapter

I'm new to Android development, so I'm not even sure whether this is the best way to do it or not. So if you got another approach for my problem feel free to give ma advice.

Installing “Sundials” to make use of Assimulo

python ubuntu install

Firstly i should probably state the reason I'm doing this: i want to experiment with some different differential equation solvers to compare efficiency and memory usage for a project I'm working on...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.