Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: CSS Trick – How to style Activity Stream odd and even posts.

@hnla

Participant

Couple of things: first you need the space as mentioned bit earlier ‘ odd’ ‘ even’ second I notice some backticks in the pastebin code that’s probably fromm trying to paste the code into the forum fist but just make sure that those backticks don’t exist in the real source code.

You should be seeing a new class on the li elements? Where are you actually looking for results? you initially will not see any styling as all this does is place a class and you will then need to style that class: pseudo example #activity-stream li.odd {background: red;}

You won’t be using this to style with : :nth-child(odd)

How are you checking the elements for the generated / printed class? Firebug will let you see the markup as output to browser.

The pastebin code looks ok!

Skip to toolbar