Say I've a p
element or div
element having a text say about 10-15 lines, now my client has a weird call on this, he needs odd/even lines having different text color. Say Line 1 - Black, so Line 2 should be Grey, Line 3 should be again black and so on...
So I decided using span's and changed the color but variable resolution is killing things here, Am aware of the :first-line
selector (Which won't be useful in this case), also selectors like :odd
& :even
will be ruled out here as am not using tables, so is there any way I can achieve this using CSS or do I need to use jQuery?
TL; DR : I want to target odd/even lines in a paragraph or a div
I need a CSS solution, if not, jQuery and JavaScript are welcome