See example http://jsfiddle.net/qqyYU/1/
<div class="detail">
<p><b>Entry</b><br>
First <span>40,-</span><br>
Second <span>20,-</span></p></div>
css
.detail p span:first-child {background:yellow;}
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The first-child of your
<p>is a<b>tag, not a<span>:“This pseudo-class matches an element only if it’s the first child element of its parent element.” (http://reference.sitepoint.com/css/pseudoclass-firstchild)
EDIT
You may be able to use the adjacent sibling selector if you can’t change the class of the element and you are required to support IE7 (though it may not work):
http://jsfiddle.net/qqyYU/5/