Have a Little Fun With CSS

Going Green on St. Patrick’s Day

Sorry I didn’t get to this a little sooner.   Didn’t have the idea till some things were cleared off the desk and out of my mind.   Yes, I just said “Out of my mind”

I’ve been modifying a theme lately and doing a lot of goofing re-coding of the CSS to get it to look the way it should instead of the way it did.

This afternoon I got to wondering if I put a div class at the top of a post using the HTML tab would it format just the one post with a little CSS coding in the style.php.

What the heck give it a try I thought.

Add a Little Color on Special Occasions

I put this code in the style sheet

#green {
background: #c2f0c2;
padding: 5px;
#green h3 {
background: #33cc33;

Then from the HTML tab I added at the top of the post <div id=”green”>

At the very end of the post I put in the </div> to end it.

Of course you will have to tweak it according to how your theme css is setup.   But it can add some very annoying PUNCH to a post.   Kind of like a bad pun.

However, used with discretion and a little practice you can create some very nice custom styling for you blog posts.

But please, don’t use green.


  1. Thanks for experimenting with this and sharing the results. I’ll probably forget to do it, but I think it’ll be a great way to change background colors for holidays etc.. As you did for this post.