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.

Print Friendly

About Dave Smith

Did you know that with Twenty Ten if you fill in the User Biographical info field it will put an author window at the end of each post. Be sure to get your gravatar for all authors on your site. And fill out the Bio field in the profile. Connect with Dave on Google+
This entry was posted in How To and tagged , , . Bookmark the permalink.

One Response to Have a Little Fun With CSS

  1. Jayson says:

    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.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

* Copy this password:

* Type or paste password here:

18,204 Spam Comments Blocked so far by Spam Free Wordpress

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

CommentLuv badge