i have problem with the css selectors of "UL" i have 2 ul on my menu but how i disable from ul 1 to effect 2 ul with css i mean when i make css for ul 1 is automatic make the same css to ul 2 the same is in the li sorry for my English.
Give the ul an unique id and apply css to that... More info http://www.tizag.com/cssT/cssid.php Code (markup):
Something Like This <ul id='menu'> <li></li> <li></li> </ul> <ul id='menu_2'> <li></li> <li></li> </ul> HTML:
If you think that will solve the problem, you have two problems. It means you haven't used the cascade effectively or you haven't developed a sane system of hooks. The use of !important is harmful; it overrides user styles, a Bad Thingâ„¢ cheers, gary
If we could see your markup AND your CSS it would help -- normally if it's just one in another put an ID on the outer one but not the inner, if they're really nested, and for the LI, just unset any values you set on the nested one.
kk5st: I just wanted to point out another way of styling elements. For me it is a quick solution that you can use when you don't want to bother with complex CSS files. Maybe it is not the best thing you can do but I don't see any harm in using it. If it works, why the heck not?
As he said, it can prevent user.css from working in some browsers (Opera it still works). Generally speaking it's extra code and if you 'need' to use it, there's probably something wrong with the orders in the first place. Just because something works doesn't mean you should do it that way.
you have to make a different between these two objects, the best thing is to use id for example : <style> .tabs{ //will effect for both ul ......... } #ul_1 { // only effect for only the first ul .......... } </style> <ul id="ul_1" class="tabs"> <li>A1</li> <li>B1</li> <li>C1</li> </ul> <ul id="ul_2" class="tabs"> <li>A2</li> <li>B2</li> <li>C2</li> </ul> HTML:
if you are using a ul in sub-menu then use hierarchic of CSS like : .menu ul {style} .menu ul li ul{sytle} and if any style impact on sub li then use !important tag before closing property like : font-weight:bold !important;