View Single Post
Old 07-15-2009, 05:19 AM   #7
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 71,501
Karma: 306214458
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
Quote:
Originally Posted by rogue_ronin View Post
I thought that there was a first-word pseudo-element, but there isn't
Yes - seems a bit of an oversight to me. So adding in a first-word span seems the best solution.

Quote:
Originally Posted by rogue_ronin View Post
Is there a first-paragraph pseudo-class?
No and yes. There isn't a first paragraph pseudo-class, but if you enclosed the sections that should have a special first paragraph with a div of class parablock, you could use

div.parablock > p:first-child { text-indent: 0; margin: 0 }

rather than assuming that the first para always follows an h4.

Quote:
Originally Posted by rogue_ronin View Post
The div.body h4+p example -- could you expound on it? Particularly the + -- my quick search failed...

I did find something on the :first-child pseudo-class: would this be relevant?
You're right - htmldog doesn't do the sibling selector. I must have picked that up elsewhere.

http://www.w3.org/TR/CSS2/selector.h...cent-selectors

explains all. The first-child pseudo class is useful in other ways - but not here, as the p isn't a child of the h4.
pdurrant is offline   Reply With Quote