html - pseudo class content not showing properly -


hi i've created radio button accordion using css , html5, problem i'm having pseudo class section element won't show it's content e.g content: '1' , content: '3' section panels. i've created codepen see if can numbers @ bottom of panel , showing corresponding numbers show. i've been following tutorial

codepen.io

&:nth-child(1):after { content: '1'; } // doesn't show &:nth-child(2):after { content: '2'; } // can't line &:nth-child(3):after { content: '3'; } // doesn't show &:nth-child(4):after { content: '4'; } // can't line 

you have <label> elements considered children of <section> element , add towards count.

so compensate label element, change child selector numbers.

&:nth-child(2):after { content: '1'; } &:nth-child(4):after { content: '2'; } &:nth-child(6):after { content: '3'; } &:nth-child(8):after { content: '4'; } 

Comments

Popular posts from this blog

jquery - How do you format the date used in the popover widget title of FullCalendar? -

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -