jqueryUI Css widget, how to prevent descendant
i'd like to prevent CSS from my styles do descendants of descendants without giving them class开发者_Go百科es or ids? my jQueryUI widget are affected by my ascendant CSS.
i've tried
For instance:
.myClass > ul {...} instead of .myClass ul {...}
but it doesn't work (checked with Firebug 1.5/FF 3.6)
.myClass MUST BE a class, not an id (#). It seems to work with id, but that's not what i want..
In fact, i'd like something to 'contain' CSS jQueryUI Widget.
Thanks from your help.
Sebastien
Usually jQueryUI Widgets are wrapped inside a DIV that has a class such as .ui-widget, however those are usually at level of a first child of the body, meaning if you have your layout in something like a #wrapper div, the widgets styles won't be affected be descendant selectors coming from that wrapper, to make things clear:
<body>
<div id="wrapper"><h1>an h1 inside the wrapper</h1></div>
<div class="ui-widget"><h1>h1 inside the jquery ui widget</h1></div>
</body>
So if you do put #wrapper in front of all your styles jQueryUI won't pick them up.
精彩评论