CSS
-Tricks
treehouse :
what would you like to learn today?
Web Design
Web Development
iOS Development
Show search box
Search
Search in:
All
Articles
Forums
Snippets
Videos
✕
Home
Forums
Snippets
Gallery
Videos
Almanac
Demos
Lodge
Navigation 'n' Search
Forums
Illustration by Nick Sirotich
Forums
»
CSS Combat
[Solved] last-child of a class
jknetdesign
Permalink to comment
#
May 2012
http://demo.elcaminorealfutbol.org/our-board/
How would I apply the last-child rule to the last container to not show the bottom border?
I tried:
.member-holder:last-child {
border-bottom: none;
}
jknetdesign
Permalink to comment
#
May 2012
I ditched the clear class and used overflow:hidden instead, which answered my question.
cssdeck
Permalink to comment
#
May 2012
border-bottom: 0; (or even none) should work fine.
sometimes :last-child might not be selecting the "last child" as you expect it to, so you might want to check out :last-of-type
Cheers
Add a Comment
How would I apply the last-child rule to the last container to not show the bottom border?
I tried:
.member-holder:last-child {
border-bottom: none;
}
sometimes :last-child might not be selecting the "last child" as you expect it to, so you might want to check out :last-of-type
Cheers