vendredi 31 juillet 2015

tr:last-child selector does not work

I've rather complex cascade around themed components rendered by C#/Razor code within MS MVC framework, but anyway: according info I'm able reveal in browsers (Firefox 39.0, Chrome 44.0.2403.125 m) there is something strange what I'm not able understand:

I have a selector:

table.Theme-DataGrid-Table tr.Theme-DataGrid-Row td  

and it works as expected. But if I added last-child selector

table.Theme-DataGrid-Table tr:last-child.Theme-DataGrid-Row td  

nor

table.Theme-DataGrid-Table tr.Theme-DataGrid-Row:last-child td  

the show stops and previously selected style disappears from all td elements including the last row even if the last row has still the same class - in browsers's bread-crumbs can be seen:

tr#unitorder_9.Theme-DataGrid-Row.Theme-DataGrid-ItemCss

Pls, does does anybody know what I'm missing?

Thanx, pf

UPDATE1 The code above is actually shown in pop-up jQuery dialog and loaded as partial view into base page DOM. If I copy div container element and all its content from Browser to Fiddler and supply corresponding .css styles, then :last-child selector works.

Could be possible that it depends on the fact, that HTML code of poped-up dialog lives within DOM object of complex basal page?

Aucun commentaire:

Enregistrer un commentaire