I have 50 questions (per page) that are practically identical, and I want to switch background colors every other question to help people visually distinguish where they are.
Changing the container color changes all question colors, and only using a question seperator is sub-optimal. I can't change colors based question ID number either because the questions are randomised, so there isn't a consistent order for alternate shading.
Can anyone help me or point me in the right direction?
Page 1 / 1
Hey rdkn, take a look at jQuery's nth-child selector. If you're code-savvy, this will give you what you're looking for. Basically, it's those tables you see online where every other line is a shade of grey. You'll just need to play with what class you'll need to select; shouldn't be too difficult. Let me know if you get stuck!
W3Schools had a really good, easy to read demo of this; posting it here for your convenience.
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.