On Mar 6, 2011, at 4:52 PM, Rob Crowther wrote:

> On 06/03/11 20:22, tee wrote:
>> but I can never get h2:first-child works
>> 
> Here's an example, specifically using h2 elements since you mentioned them:
> 
> http://www.boogdesign.com/examples/css3/first-child.html
> 
> By default, every element has a blue border, but any element which is a 
> :first-child has a red border:
> 
> :first-child {
>    border: 1px solid red;
> }
> 
> In addition, h2 elements which are children of #content and first-child 
> within their parent have white text on a black background:
> 
> #content h2:first-child {
>    color: #fff;
>    background: #000;
> }

Indeed. I'd just got a chance to check one of the sites that the h2 is used for 
accordion title and still doesn't work. But if I bring it to JSBin without 
other code, it works. So something must be conflicting with it.

Thanks!

tee

*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org
*******************************************************************

Reply via email to