css3 - CSS Selector for a Child Element -
trying find css
selector , not able succeed.
i need span has class rtin
parent ul
must kid of li
i tried applying on every node
.rtli > ul > li > div > span.rtin { font-size: 10px; }
<ul class="rtul"> <li class="rtli"> <div class="rttop"> <span class="rtsp">parent</span> <span class="rtminus"></span> <span class="rtin"></span> </div> <ul class="rtul"> <li class="rtli rtlast"> <div class="rtbot"> <span class="rtsp"></span> <span class="rtin">child</span>// required span </div> </li> </ul> </li> <li class="rtli"> <div class="rtmid"> <span class="rtsp"></span> <span class="rtin">child</span> </div> </li> <li class="rtli rtlast"> <div class="rtbot"> <span class="rtsp"></span> <span class="rtin">child</span> </div> </li> </ul>
any corrections ?
here output in firefox , chrome
class="snippet-code-css lang-css prettyprint-override">.rtli > ul > li > div > span.rtin { font-size: 10px; }
class="snippet-code-html lang-html prettyprint-override"> <ul class="rtul"> <li class="rtli"> <div class="rttop"> <span class="rtsp"></span> <span class="rtminus"></span> <span class="rtin"></span> </div> <ul class="rtul"> <li class="rtli rtlast"> <div class="rtbot"> <span class="rtsp"></span> <span class="rtin"></span>// required span </div> </li> </ul> </li> <li class="rtli"> <div class="rtmid"> <span class="rtsp"></span> <span class="rtin"></span> </div> </li> <li class="rtli rtlast"> <div class="rtbot"> <span class="rtsp"></span> <span class="rtin"></span> </div> </li> </ul>
the selector working!
you had html syntax error y html
code:
you had:
span class="rtin"></span>
and should be:
<span class="rtin"></span>
google chrome getting css style:
css3
No comments:
Post a Comment