Answer the question
In order to leave comments, you need to log in
:nth-child not counting elements correctly?
There is markup
<span>1</span>
<span>2</span>
<span>3</span>
<span>4</span>
<span>5</span>
<span>6</span>
<span>7</span>
<span>8</span>
<span>9</span>
<span>10</span>
span
width: 40px
height: 40px
border-radius: 5px
background: #F8A25D
display: inline-flex
justify-content: center
align-items: center
font-family: Arial, "Helvetica Neue", Helvetica, sans-serif
color: #333
font-weight: bold
&:nth-child(3n + 2)
border-radius: 50%
Answer the question
In order to leave comments, you need to log in
Scripts are also children, so browsersync spoils your raspberries. You need nth-of-type, not nth-child.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question