In the “Our Workshops & Programs” section on the home page, I need to remove the padding from the last item in each row. I’ve tried using this css but it’s not working for me:
Also, how can I allow those little butterfly icons to extend past the #inner container? If I add overflow: visible, the floats aren’t contained (as you can see now). If I add overflow: hidden or auto, the floats are contained but the butterfly icons don’t extend past the container. What am I doing wrong here?
The last child is the very last one in the list, not the end of each visible ‘row’.
You could target every third one in your setup with this:
.featuredpage:nth-child(3n+1) {padding:0;}
Also, how can I allow those little butterfly icons to extend past the #inner container? If I add overflow: visible, the floats aren’t contained (as you can see now). If I add overflow: hidden or auto, the floats are contained but the butterfly icons don’t extend past the container. What am I doing wrong here?
Oops - forgot I had that in there. I was experimenting because I didn’t think it was working. I’m now using the code you gave me but it still seems like there’s padding on the 3rd item.
Inside the container there is a div around an h4, so that is the first child. Then come the .featuredpage divs. So the ones at the end of each ‘row’ are the 4th and 7th children of the div, which 3n + 1 matches.
When n = 0, 3n + 1 = 1 (the first child) but that’s not a .featuredpage div, so nothing happens. When n = 1, 3n + 1 = 4 (the 4th child) and that is a .featuredpage div, so the rule kicks in. Etc.