Support » Fixing WordPress » To give a post a different styling in the loop

  • Hi!

    I’m making an online magazine. Check here for live preview of my blog. What I want to do, is give for exemple one post a border around, and another a grey background. I’m not talking about the single.php file, but the frontpage itself. Is there any way I can do this?

Viewing 1 replies (of 1 total)
  • Just those 2 styles?

    You could use the css3 selectors :odd and :even.

    But you’ll also need a fallback for other browsers that don’t know css3. This fallback has to be using classes. There probably is a simple way of doing this using a wordpress filter but i’m not sure how.
    You might also use javascript to add .odd and .even classes but i would advise against that.

Viewing 1 replies (of 1 total)
  • The topic ‘To give a post a different styling in the loop’ is closed to new replies.