Quote:
Originally Posted by rogue_ronin
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
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
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.