Need help? Check out our Support site, then


Color backgounrd behind every 2nd post?

  1. Is there a way to have a colored background behind every second post? I don't want to apply a background color as a default behind all posts. I need to differentiate quite clearly between each post, and would like to have cream behind every second. I ahve no knowledge of CSS/html, but could add a code if one was suggested to me! Thanks!

    The blog I need help with is oneequalstwo.wordpress.com.

  2. Not really. There would have to be some scripting and such added to the underlying theme files, and we do not have access to those.

    You can put a background on the text in a post using inline CSS, but the background will only be around the text you enter into the post edit window.

  3. Thank you. How would I add colour to the background of text in a post please? Is that a simple matter of pasting some code in the html bit; or do I need to go into the CSS section? I'm a complete novice when it comes to coding! Thank you.

  4. Hello,
    That's described here > Background color to text > http://wpbtips.wordpress.com/2009/09/19/background-color-to-text/

  5. Thank you!

  6. You're welcome. :)

  7. panaghiotisadam
    Member

    @oneequalstwo: The master of the technique thesacredpath suggested is our fellow forum volunteer Tess:
    http://1tess.wordpress.com/

  8. panaghiotisadam
    Member

    @Rich: But re the original question, I think something like this would work:

    article:nth-child(2n) {
    background:#456789;
    padding:16px;
    }
  9. Hmmm, it might, but then one never knows with CSS tidy if it would strip it out or not. Did you try it and preview?

  10. I was too chicken to try it, so I followed the link that timechief provided above and ended up with some nifty coloured background boxes behind my intro texts, which I'm pretty chuffed with! Thanks so much, all of you! What a terrific resource you provide. It's been so seamless putting my blog together with all your help. Thanks again.

  11. You are welcome from me.

  12. panaghiotisadam
    Member

    @Rich: Yes I tried it. It works but if you use it you need extra touches (for example, if you don't add anything else there will be a white square around the comment bubbles). And I don't know if Explorer understands it.

  13. Does Exploder understand anything?

    The white square around the comment bubble is part of the image (why did they not make that a gif or png with a transparent background?).

    I've added that to my CSS "tricks" file.

Topic Closed

This topic has been closed to new replies.

About this Topic