free hit counters
If you are using Internet Explorer as your browser please be running at least IE 7 or above. This site does not support IE 6 or below. Go here for the latest free version including easy download and installation instructions If you want to make it real easy on yourself, download Firefox , the most popular browser in the world. It's free and simple. You'll be so glad you did.
May
5
2009

Style any post differently than the rest with the css class box

There is a really cool feature in Thesis that is greatly overlooked and underused. It’s the css class option located below the editor on the “add new post” page…

161

What this does is it allows you to give the post your writing or editing a unique class name. Once you do this, you can give it whatever styles you want in your custom.css.

For example, let’s say I’m writing a new post and I when that post gets published I want it to have a red sidebar. No other posts on my site have a colored sidebar but I want this one to.

Knowing that I’m going to style this post different than any other post I’m going to give it a class name of “red post” so in the css class box I type in

red-post

Now, you have to figure out what you want to style and then put those selectors in the custom.css. I know that I want to make one of my sidebars red so in my custom.css I drop this code in…

.red-post #sidebar_2 {background-color: red;}

My sidebar 2 changes to red and it’s the only post on my site that has a red sidebar

You can style any selector you want on the page.

The css class is a very powerful feature and highly underused. You can literally make every single page on your site completely different from all the rest. Let your imagination do the styling. The possibilities are endless..

Leaving a comment with code in it...

If you would like to leave a comment and you have examples of code you want to show, you must "escape the code". This allows the entire code to show correctly by inserting certain variable around certain tags to make them show. If you don't "escape the code" your code will show up broken, mangled, and it won't be able to be seen correctly. "Escaping the code" is very simple...

  1. Copy your code you want to show
  2. Click here to go to the site to escape the code
  3. Follow the directions, it's so easy
  4. Once you have the escaped code copied, paste it in the comments area where you want
  5. Now you can enjoy life


Go ahead, leave a comment...

{ 1 comment… read it below or add one }

Somone May 18, 2009 at 4:28 pm

How about an example of a page on your site that is unique?

Reply

Leave a Comment

Previous post: The absolute easiest way to add your own header image

Next post: Place a row of ads on your page