req: Odd/even classes for post containers

  1. 6 years ago

    This is a kind request for a small plugin. Let's add classes to post containers, indicating odd/even posts. It would be used to add zebra-style background for posts.

  2. Edited 6 years ago by ciruz

    You can do this really simple with css :nth-child selector and even/odd keywords. You will not need a plugin for this.

    Just add something like this, to your css file:

    ol.postList li:nth-child(odd) .postContent.thing:after {
    	border-color:#f9f9f9;
    }
    
    ol.postList li:nth-child(odd) .postContent {
    	background-color:#f9f9f9;
    }

    Result:
    -image-

  3. css filename?

 

or Sign Up to reply!