html - style first child of <UL> (not sub <ul> without adding ID's or Classes) -
**thank answers. waiting on cache plugin removed before can test , confirm everythign working correctly.
i have unordered list contains sublist. want update children of main <ul> "names" , "jobs"
<ul> <li>names <ul> <li>mike</li> <li>bob</li> <li>steve</li> </ul> </li> <li>jobs <ul> <li>police</li> <li>fire fighter</li> <li>banker</li> </ul> </li> </ul> i want ability style child <li>'s of main <ul> not of sub items. trick can not add classes or id's list or sublist. can put whole thing in containing div.
*note if add class or id add of them. premade template have no control over.
i thinking this:
<div id="mylist_container"> <ul> <li>names <ul> <li>mike</li> <li>bob</li> <li>steve</li> </ul> </li> <li>jobs <ul> <li>police</li> <li>fire fighter</li> <li>banker</li> </ul> </li> </ul> </div> and style this:
#mylist_container ul>l1{ font:bold 18px arial; }
i think answered own question! or @ least 99% of way. create 1 more child selector adding > between #mylist_container , ul. target ul child of #mylist_container , not go deeper in structure.
#mylist_container > ul > li { /* styles */ }
Comments
Post a Comment