[html5] last-child

Kenneth W Foy, Jr kete at ninthfloor.org
Wed Nov 2 19:15:59 PDT 2011


On Wed, 2 Nov 2011 23:13:51 -0200, Maujor (via-gmail) wrote:
> Yes it works!
> Have a look at: http://jsbin.com/ulotuf/edit#html

Thanks, I figured out why mine wasn’t working: I had a different
kind of tag after the last paragraph tag, so the last paragraph
tag wasn’t the last child of the article parent. I reproduced it
on your jsbin with a div child after the last paragraph child. So
I just took out the pseudo class and got the result I wanted
without losing the top margins between the paragraphs.

last-child is “the last child of some other element”, not the
last instance of a particular tag before one or more other types
of children. http://www.w3.org/TR/selectors/#last-child-pseudo
-- 
Regards,
Kenneth W Foy, Jr



More information about the Help mailing list