:last-of-type Pseudo-Class Not Acting as Expected
:last-of-type to an element that should be as such. Check out the final
div.info (that's the bottom information for each article) on http://www.elemovements.com. Why is it not working?
:nth-of-type() family of pseudo-classes only look at an element's type, that is, its tag name. They do not filter by your class selector or any other selector.
Therefore, your statements:
:last-of-typeto an element that is clearly as such. Check out the final
Are contradictory. There's a
div.center after that, making that the last
div, not your
You cannot currently use CSS selectors to find your last
This post first appeared on CSS3 Recipes - The Solution To All Your Style Problems, please read the originial post: here