ugrás a tartalomhoz

Child and adjacent sibling selectors

zoliky · 2009. Már. 6. (P), 22.44
Sziasztok!
A "CSS Mastery" konyvet olvasom, amelyben a kovetkezot irja:

Child and adjacent sibling selectors The first of these advanced selectors is the child selector. Whereas a descendant selector will select all the descendants of an element, a child selector only targets the element’s immediatedescendants, or “children.” In the following example, the list items in the outer list will be bold while list items in the nested list will remain unaffected:


Es itt a kod:

#nav > li {font-weight: bold;} 

<ul id="nav"> 
<li>Home</li> 
<li>Services 
<ul> 
<li>Design</li> 
<li>Development</li> 
<li>Consultancy</li> 
</ul> 
</li> 
<li>Contact Us </li> 
</ul>
Begepelem a kodot de az a problema, hogy nalam az osszes LI vastag. Akkor nem ertem miert irja ezt:

In the following example, the list items in the outer list will be bold while list items in the nested list will remain unaffected:


Valami otlet ? Firefox 3.0.6 szalad nalam.
 
1

Örökli

attlad · 2009. Már. 7. (Szo), 14.55
'font-weight'
...
Inherited: yes
Forrás: http://www.w3.org/TR/CSS21/fonts.html#propdef-font-weight

Próbáld ki pl. a border-rel.