Two colons are for pseudo elements. One colon is for pseudo classes. However, I believe that one colon always works because there wasn't a distinction until CSS3.
::first-letter ::first-line ::before ::after :link :visited :hover :active :focus :first-child :lang -----Original Message----- From: css-d-boun...@lists.css-discuss.org [mailto:css-d-boun...@lists.css-discuss.org] On Behalf Of Crest Christopher Sent: Friday, September 26, 2014 12:04 PM To: Philip Taylor Cc: CSS Discuss Subject: Re: [css-d] First-Child Is there a time to use two colons and is there a time to use one colon ? Philip Taylor wrote: > Crest Christopher wrote: > >> Here<http://jsfiddle.net/bpL490pn/1/>. > > Right, so I see two intended "first-child" rules there : > >> ::first-child {ouline:1px dotted lime;} >> #t3 p::first-child{color:red;} > > The first appears to be generic and targets all elements that are > first children of their parents; the second targets the first child<p> > element that appears nested within an element whose ID is "t3", which > in your code is the parent<div>. Eliminating the syntax errors > (mis-spelled "outline", two colons where one is required) yields this : > > http://web-consultants.org/tests/First-child.html > > which appears to demonstrate what you want. > > Philip Taylor ______________________________________________________________________ css-discuss [css-d@lists.css-discuss.org] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/ ______________________________________________________________________ css-discuss [css-d@lists.css-discuss.org] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/