I am seeking a CSS-only solution to identifying the first element of the intersection between:
- every 5th child flex-element
- empty-filler elements
CodePen Example: Please read my example first https://codepen.io/anon/pen/aqXyPP.
My attempt here doesn't work.
.flex-element:nth-child(5n).empty-filler:first-child {
font-weight: bold;
font-style: italic;
}
However, if I remove the pseudo class selector :first-child
I get close to my solution, but, then the 15 is also incorrectly selected.
Question 1) How can I change my CSS selectors to achieve my goal? While I can change my CSS and HTML structure, I cannot introduce new css classes into my HTML markup.
Question 2) Can I use :nth-child()
and :first-child
together?