Comments on: :nth-last-of-type https://css-tricks.com Tips, Tricks, and Techniques on using Cascading Style Sheets. Tue, 26 Nov 2019 23:32:09 +0000 hourly 1 https://wordpress.org/?v=6.4.3 By: Steve Berry https://css-tricks.com/almanac/selectors/n/nth-last-of-type/#comment-1752769 Tue, 26 Nov 2019 23:32:09 +0000 http://css-tricks.com/?page_id=14236#comment-1752769 When a carousel shows all items in a desktop width, the lone indicator can be invisible.
Then at a narrower width, when more than one indicator is presented…
.carousel-indicators > li:nth-last-of-type(1){opacity:0}
.carousel-indicators > li + li:nth-last-of-type(1){opacity:1;}

]]>
By: Marcel Pirosca https://css-tricks.com/almanac/selectors/n/nth-last-of-type/#comment-1594174 Thu, 30 Apr 2015 09:56:42 +0000 http://css-tricks.com/?page_id=14236#comment-1594174 There’s an error on line 34 and 38 of the CSS. Instead of

.five li:nth-of-type(3n+1) {

we should have

.five li:nth-last-of-type(3n+1) {

and instead of

.six li:nth-of-type(even) {

we should have

.six li:nth-last-of-type(even) {

since we are talking about the last-of-type pseudo selector. Right now the example is inverted to what’s expected and can be confusing.

]]>