February 2, 2007

How to Protect CSS Mods for ANY WordPress Theme 97

Attention! I’m hosting a pre-launch sale for the all-new Thesis Theme for WordPress at DIY Themes. This is your chance to pick up a lifetime membership to this amazing new site framework, and you’ll also get exclusive access to my upgrades, tips, and tutorials that will help you run a killer Web site!

Futureproof CSS styling

I know you’re out there. You, the keen Web designer who rolls out both client and personal sites by modifying the CSS styles of existing WordPress themes. You’re smart, and I like that about you — after all, there’s no sense in reinventing the wheel with every project now, is there? Utilizing WordPress themes, or Website frameworks, is the only way to fly these days.

But there’s one major problem here.

Whenever one of your favorite theme frameworks is updated, you have to identify the new changes, re-implement your CSS mods, and then move ahead from there. That might not sound so bad, but I know there are tons of you out there who make hundreds of modifications. Suddenly, that molehill really is a mountain.

Are you sure you want to keep spinning your wheels every time a new version of your preferred framework is updated? What you need, my friend, is a futureproof, bulletproof means of protecting your CSS mods so that you can ride the wave of agile development without the associated headache from upgrading!

The Simple Way to Futureproof Your CSS

As a theme developer, I’ve been able to witness firsthand the sheer agony that people are confronted with when they try to adapt their existing design modifications to a theme upgrade. Couple that with another variable like the recent release of WordPress 2.1, which also changes the game, and you basically have mass confusion and an overwhelming sense of what can I do now?

Never touch the original stylesheet again — it’s just not the most secure, most efficient method of operation! On top of that, it would be nearly impossible for you to go through a stylesheet that you’ve hacked up and pinpoint each and every little thing you’ve changed.

Download the Custom CSS File for WordPress

Starting today, you can futureproof your CSS changes by implementing a custom stylesheet that simply overrides the styles defined in the theme’s original stylesheet. Here’s what you need to do:

Download the custom.css file
Get it by clicking the image at right or from this link here.
Modify your theme’s header.php file

Open up your desired theme’s header.php file and insert the following code between the <head> tags:

<link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/custom.css" type="text/css" media="screen" />

Use this code if you want to copy and paste that last line for your own use.

Next, while still inside the header.php file, locate the <body> tag and append it with a CSS class called custom. Once you’ve done that, your resulting <body> tag should look something like this:

<body class="custom">

After that, save the header.php file and upload it to your server.

Implement custom styles
Follow the instructions outlined in the custom.css file, or else check out the rest of this article to get an idea how these custom styles work.

Custom Styling Example

To illustrate, let’s assume that your theme’s original stylesheet contains links defined like so:

a { color: #009; text-decoration: underline; }
a:visited { color: #999; text-decoration: underline; }
a:hover { color: #c00; text-decoration: underline; }

In layman’s terms, the above code essentially defines unvisited links as blue, visited links as gray, and hovered links as red. Also, based on that code, links will be underlined.

Let’s say, however, that you want unvisited links to be green (#090) and hovered links to be orange (#f60). You’re going to leave visited links as gray because that works well with your site. Also, you’d prefer to remove underlines from all links because you like a cleaner look. Here’s what you would need to define within custom.css in order to make that happen (changes are highlighted):

.custom a { color: #090; text-decoration: none; }
.custom a:visited { color: #999; text-decoration: none; }
.custom a:hover { color: #f60; text-decoration: none; }

Because of the rule of specificity, which is a behavior intrinsic to the way CSS works, the styles you define with the .custom prefix will override those defined in the theme’s original stylesheet.

The Bottom Line

I mentioned agile development earlier, and I can’t stress enough how important it is (and is going to be!) to position yourself to adapt successfully to the rapid-fire world of Web software development.

Since January of 2006, WordPress has rolled out two major updates, and that same timeline has also been dotted with smaller updates as well.

Since I launched the Cutline Theme for WordPress in September of 2006, I have rolled out five upgrades. That’s an average of one upgrade per month.

See what I mean here?

If you want to make continued use of the most up-to-date Web publishing software and avoid upgrade headaches, then you’re going to need to implement best practices for agile development. As someone who develops and tweaks themes regularly, I’m here to tell you that customized CSS styling is an excellent place to start.

97 Comments ↓

#Robert Bruce  at 10:14 pm on Feb 3, 2007

This solves THE problem that I’ve hated since the beginning of this madness.

You are now responsible for the writing of a few more immortal poems, instead of the re-writing of CSS mods.

Nice Pearson, really nice. Beer will be flung in your honor tonight.

#David Krug  at 10:27 pm on Feb 3, 2007

Did someone say beer?

#Custom CSS : Blog Archive Andy Beard  at 12:49 am on Feb 4, 2007

[...] Chris Pearson has just written a dynamite post on how to use custom CSS with a Wordpress theme. It is especially important if you tweak your themes a lot, and the theme designer is highly active in upgrading themes with new features, and also helps if you tend to switch themes for various custom elements. A lot of plugins for instance ask you to add some CSS to your main CSS file, because they don’t inject it into your header automatically. [...]

#Enblogopedia  at 4:54 am on Feb 4, 2007

Hmmmm..seems like the K2 scheme idea. But still a clever way ;)

Thanks for sharing.

#mblair  at 6:40 am on Feb 4, 2007

Wow! That’s cool. I’ve used a secondary css files quite a bit to override original theme style but had never thought about using specificity to such an advantage. I’m going to stick this one in my toolbox right next to my pair of pliers.

#Jason Brown  at 8:06 am on Feb 4, 2007

Nice work Chris, really nice work pointing this out.

However, I stand by the fact that if anyone has been a web designer for over a year, you should already know this by now.. especially if you use CSS daily and work with selectors, id’s, hacks, etc…

But again I know many people don’t normally do this day in and day out and might not have the experience with CSS to know this, which is why I say Good Job Chris!

#aNieto2k  at 9:18 am on Feb 4, 2007

And if you use

replace
.custom –> .mycustom

and

The problem it’s here another time??

#Bob Jordan  at 12:52 pm on Feb 4, 2007

Denis de Bernardy has been doing this with the Semiologic theme since 2005. It is a very good way of handling customizations of distributed themes.

#Hamish M  at 3:19 pm on Feb 4, 2007

Great tips Chris, I’m sure this will save people a lot of headaches.

#Peter V Cook  at 2:27 pm on Feb 5, 2007

James, I think you’re comment is exactly how I feel too.

#Chris @ Martial Development  at 2:44 pm on Feb 5, 2007

On top of that, it would be nearly impossible for you to go through a stylesheet that you’ve hacked up and pinpoint each and every little thing you’ve changed.

Good advice overall, but this CSS comparison is hardly impossible. Developers do it almost every day.

#Chris P.  at 2:53 pm on Feb 5, 2007

…and I’m saying that developers who routinely make use of WordPress themes — specifically, themes that are updated frequently — could save themselves time and energy by adopting this method.

#Samo  at 8:52 pm on Feb 5, 2007

Interesting information for someone just getting started with Wordpress and who happens to be a bit of a CSS Noob :^)

#Chris Poteet  at 9:14 pm on Feb 5, 2007

Nice, but my plugin is a little easier.

#Yetrina  at 9:28 pm on Feb 5, 2007

I’ve been using this plugin for the last few months. It’s simple and easy. No need to modify the header or body tag.

#Arun  at 10:09 pm on Feb 5, 2007

Thank you so much for this.

#Arun  at 10:20 pm on Feb 5, 2007

Just curious, what if a user wanted to modify IDs in addition to classes? Or add new IDs/classes? What do you do in that scenario?

#Billy  at 10:23 pm on Feb 5, 2007

Or you could learn a bit of CSS and make your own theme.

#Chris P.  at 10:25 pm on Feb 5, 2007

Arun — This works the exact same way. For instance, let’s say that you want to pinpoint the h1 element, which sits inside a div with an ID of masthead.

Based on the method described in the post, you would target the h1 with this line of code:

.custom #masthead h1 { ...css here... }

#Arun  at 10:36 pm on Feb 5, 2007

Chris — Cool, thanks. I’m working on developing my own theme, and I’d like to be able to offer this method to people using my theme. Thanks :)

#Brock’s Life » links for 2007-02-06  at 2:39 am on Feb 6, 2007

[...] How to Protect CSS Mods for ANY WordPress Theme will do (tags: webdesign wordpress css) [...]

#  Protect CSS Modifications for Any WordPress Theme by Blogging Pro  at 3:45 am on Feb 6, 2007

[...] Check out Pearsonified for all the details. Tags: [...]

#The WP Themes » Blog Archive » How to Protect CSS Mods for ANY WordPress Theme  at 4:28 am on Feb 6, 2007

[...] Utilizing WordPress themes, or Website frameworks, is the only way to fly these days. [...]

#Information Technology » How to Protect CSS Mods for ANY WordPress Theme  at 9:20 am on Feb 6, 2007

[...] read more | digg story Make money with PaidSurveysOnline.com - #1 Survey Site. Earn $1,000 a day! with ForexEnterprise HomeTypers: Get Paid Typing Data! Make $5,000 Weekly Easily! Bookmark on del.icio.us [...]

#Stijn Vogels  at 11:02 am on Feb 6, 2007

Now there’s a thing I should remember for the next update. Kuddos!

#xocea » Web Design News: January 2007  at 7:53 pm on Feb 6, 2007

[...] How to Protect CSS Mods for ANY WordPress Theme [...]

#Blog Flak - Blog Resources » Blog Archive » Future Proofing? Protecting CSS Mods for WordPress Themes  at 12:28 am on Feb 7, 2007

[...] read more | digg story Posted at February 7th, 2007 by se7en     |    |   | | | [...]

#Major Tom  at 1:08 am on Feb 7, 2007

These advises are truly important and I’ve learn a lot about it. I hope you have more posts like this coming….

#Zybatsu » Blog Archives » How to Protect CSS Mods for ANY WordPress Theme  at 5:00 am on Feb 7, 2007

[...] Technorati Tags: css, wordpress, themes, wordpress themesread more | digg story [...]

#marlyse.com » How to Protect CSS Mods for ANY WordPress Theme  at 8:36 am on Feb 7, 2007

[...] : asides - wordpress - code | created mid-morning - it was 10:02 am to be exact | trackback | rss| [...]

#Casey Woods  at 3:13 pm on Feb 7, 2007

I just can’t see rolling out a ton of client websites based on a default Wordpress theme or on somebody else’s theme. If I’m going to use Wordpress for a client site then its going to be with a theme that I’ve developed and have control over. Having said that, I’d be using a base style sheet and then a second sheet to customize it for the client. I guess that’s why they’re call Cascading style sheets!

#Shivangi  at 10:48 pm on Feb 7, 2007

Hey was quite interesting and insightful.. not just this blog.. but whatever little I browsed through your site..
This is really helpful.. coz I’m a novice with web designing..

#J David  at 7:13 am on Feb 8, 2007

Great tip. I am currently screwed with the new wordpress and all of my little css tweaks…

#bosleyp  at 8:25 am on Feb 9, 2007

Off Topic Slightly -

I really like the links at the end of your posts…most wordpress plugins for social linking seem to display picture links…how about an article (or a little help) about social bookmarking and link generation in posts

#All in a days work…  at 5:34 pm on Feb 11, 2007

[...] How to Protect CSS Mods for ANY WordPress Theme (tags: WP_Themes) [...]

#links for 2007-02-16 - mattherzberger.com  at 6:28 pm on Feb 15, 2007

[...] How to Protect CSS Mods for ANY WordPress Theme (tags: wordpress css webdesign blog themes theme templates template Hacks wp) [...]

#Adding a Custom CSS to WordPress  at 6:13 am on Feb 16, 2007

[...] Chris Pearson, a forward thinking kind of guy that he is has developed a great work-around for this which basically allows you to create a Custom CSS file that regardless of how you install or when you install it; it keeps your theme as fresh as the day you first built it. [...]

#mhinze.com » Blog Archive » links for 2007-02-07  at 7:23 pm on Feb 18, 2007

[...] How to Protect CSS Mods for ANY WordPress Theme (tags: wordpress CSS) [...]

#How to Protect CSS Mods for ANY WordPress Theme : wordpressgarage.com  at 2:31 am on Feb 21, 2007

[...] How to Protect CSS Mods for ANY WordPress Theme>> [...]

#Blogging News Blog » Protect CSS Modifications for Any WordPress Theme  at 4:02 am on Feb 26, 2007

[...] Check out Pearsonified for all the details. [...]

#Tip: Lav ændringer i dit tema i et seperat style-sheet (CSS)  at 2:07 pm on Mar 4, 2007

[...] For nylig faldt jeg over et forslag til, hvordan man kan adskille sine egne ændringer i style-sheet’et (CSS-filen) fra temaets style-sheet. Ser umiddelbart interessant ud, selv om jeg ikke selv har afprøvet tricket. I kommentarsporet til artiklen nævnes to plugins som kan nogenlunde det samme. Links til disse plugins: her og her. [...]

#PLUS.DSHOCK » Blog Archive » PROTECT YOUR CSS FOR ANY WORDPRESS THEME  at 5:59 pm on Mar 5, 2007

[...] Nah, Chris Pearson di Pearsonified mempunyai solusi untuk membuat CSS anda lebih aman. Silahkan baca detailnya. This entry was posted on Wednesday, March 7th, 2007 at 9:17 am and is filed under WordPress Tips. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site. Add this post to : Del.icio.us - Meneame - Digg [...]

#Best of February 2007 | Smashing Magazine  at 5:02 am on Mar 7, 2007

[...] How to Protect CSS Mods for ANY WordPress Theme Starting today, you can futureproof your CSS changes by implementing a custom stylesheet that simply overrides the styles defined in the theme’s original stylesheet. Here’s what you need to do. [...]

#Happy Life » Web-Sites of the Month: Best of February 2007 (zz from Smashing Magazine)  at 3:16 pm on Mar 7, 2007

[...] How to Protect CSS Mods for ANY WordPress Theme Starting today, you can futureproof your CSS changes by implementing a custom stylesheet that simply overrides the styles defined in the theme’s original stylesheet. Here’s what you need to do. [...]

#CJ  at 2:09 pm on Mar 11, 2007

Chris, I am absolutely in love with your Cutline Theme, and the ability to protect css mods. You are brilliant.

I do have a question…I am a noob to WordPress and modifying Wordpress themes, though I am familiar with some CSS (okay, I am a graphic designer - I never claimed to be great at any coding!). I would very much like to be able to add a background to my theme. I have searched high and low on the ‘net and cannot find out how to do it with the Cutline theme. I want to do something similar to what Ben Gray at Openswitch.org has done with his theme.

Could you give me tips, or point me in the right direction? Any help would be truly appreciated!

#Chris P.  at 6:08 pm on Mar 11, 2007

CJ — I just had a look at your site, and it looks as though you’ve figured out how to add a background image.

Should I assume it’s all good?

#CJ  at 6:15 pm on Mar 11, 2007

I was just coming here to tell you that…yes, I figured it out. :-)

Thank you again for an awesome theme!!

#煎蛋 » 网络最佳之2007年2月号  at 11:52 pm on Mar 14, 2007

[...] 经典文章 如何使用 OpenID 设计5原则 大众化的 Ruby on Rails 15 个生僻的 CSS 特性 IE 里的页面错位 对比 X/HTML 5 和 XHTML 2 WYSIWYG 编辑评估 (2007) 练习一些生僻的 HTML 标签 打破僵局的 8 招 Web 设计 如何保护任意 WordPress 模板的 CSS 最佳 web 交互界面设计 做个漂亮的 Favicon [...]

#CPOI  at 12:00 pm on Mar 15, 2007

Just making a comment on it’s hard to find where to post… ie maybe it would be better at the start of the comments to add new comments?

Like your blog n reviewing to for awards [My personal awards Ha!]

Also the date on your cat photo looks like it’s from 2005… and we all know that’s not true but the neophites like me may be confused…

Have you got a rhyme n reason to the colors and the call out on side here… does the plane mean friggin’ foreigner like me?

Peut être je dois continuer en français maintenant? ;-)

#Don West  at 8:41 pm on Mar 22, 2007

I’m using the sandbox for all my sites and I’ve been modifying the CSS accordingly. It’s a pretty complicated CSS file with lots of div#blah-blah selectors.

My question
Can I modify those div#blah-blah selectors from the custom css file?
If so, can you give an quick example of how the selector would look?
Would it be:
.custom div#blah-blah p { etc. etc.}

Thanks!

#Chris P.  at 8:41 am on Mar 23, 2007

Don — You’re on the right track with that solution. Just be sure to append the <body> declaration with the custom class, and then the statements you wrote above should work like a champ.

There’s always the chance that you’ll need to append some of your new CSS declarations with !important in order to instantiate the changes, but for the most part, you should be fine with the statements you’ve posed above.

#Amanda Kerik’s WordPress Blog How to Protect CSS Mods for ANY WordPress Theme «  at 1:05 pm on Apr 4, 2007

[...] http://www.pearsonified.com/2007/02/how_to_protect_css_mods_for_any_wordpress_theme.php Posted in clever, tricksandtips, repost, hacks, design, css, wordpress. [...]

#theplainbrownwrapper.com » Blog Archive » Mary Had A Little Lamb!  at 7:30 pm on Apr 9, 2007

[...] How to Protect CSS Mods for ANY WordPress Theme - 52 [...]

#theplainbrownwrapper.com » Blog Archive  at 7:46 pm on Apr 9, 2007

[...] How to Protect CSS Mods for ANY WordPress Theme - 52 [...]

#theplainbrownwrapper.com » Blog Archive  at 7:57 pm on Apr 9, 2007

[...] Are you sure you want to keep spinning your wheels every time a new version of your preferred framework is updated? What you need, my friend, is a futureproof, bulletproof means of protecting your CSS mods so that you can ride the wave of agile development without the associated headache from upgrading! [Read more →] [...]

#Everything delicious  at 7:58 pm on Apr 16, 2007

[...] How to Protect CSS Mods for ANY WordPress Theme (tags: css) [...]

#links for 2007-04-17 « Raji’s Blog  at 12:23 am on Apr 17, 2007

[...] How to Protect CSS Mods for ANY WordPress Theme (tags: css) [...]

#im/ssed « /g  at 5:44 am on Apr 18, 2007

[...] April 18, 2007 bei 12:44 · Gespeichert unter Kunst, Links, Code Durch einen Link auf diesen hilfreichen Artikel für alle die ihr Theme modden, den ich heute morgen von AEA bekam stiess ich schliesslich auf diese wirklich wunderbaren seiten internationaler Straßenkünstler oder Streetartists (whatever) [...]

#Fargham  at 5:47 am on May 10, 2007

Thanks for posting such a informative development.

#Bruce  at 7:27 pm on May 11, 2007

Hi Chris,

Not sure what I am doing wrong, but here is what I have put in custom.css to get a slightly larger font size using Cutline:

.custom body {
background: #fff;
color: #333; font: 70.5% Georgia, “Times New Roman”, Times, serif; text-align: center;
}

(Changes from 62.5% to 70.5%).

I see no difference at all after implementing. Is it because my change is “too minor to notice,” or is the body tag the one thing that can’t be re-done, or none of the above?

Thanks much!

#Chris P.  at 9:14 pm on May 11, 2007

Bruce — Try 75% instead of 70.5%.

#Bruce  at 7:23 am on May 12, 2007

Thank you, Chris. I tried that, ensured that my Firefox cache was cleared, and still couldn’t see any difference. A bit of a puzzle. However, I think I’ll just comment the custom body css back out, and leave as was. The original design is really good, I was just looking to tweak the font just a bit. I am apparently not doing something else that I should be doing, but I don’t want to waste any more of your time doing it.
Thank you again.

#Chris P.  at 9:22 am on May 12, 2007

Bruce — I figured out your problem. In your custom stylesheet, your declaration reads like this:

.custom body { ... }

It should read like this:

body.custom { ... }

#Bruce  at 9:32 am on May 12, 2007

Chris - that works beautifully!

Thank you very much!

Best regards,
Bruce

#LvCKyLuKe  at 4:27 pm on May 20, 2007

Arggh, fools by the title “Protecting CSS Mods for Wordpress..”. I thought it’s about how protecting css theme file from being seen by others..

It just protecting your original css file from being touch/edited when doing upgrade..

But, thanks for the informative resource Chris..

I think this method will make your life easier, but make your server life harder. It gonna bloats your framework package size after couple times upgrades, since it left the css garbage code intact. The server have to reads all the code when loading/parsing the web page and can affect the performace.

Btw, you have a very nice theme design…

Can you also make it public to download like Cutline?

#Chris P.  at 6:03 pm on May 20, 2007

Luke — Thanks very much, but I won’t make this layout available for public release unless I end up moving on to a new design.

That said, I think future theme releases ought to quell those desires…

#Sherman C.  at 12:25 am on May 23, 2007

Hi Chris,

I just stumbled upon your site.

All I can say is, “Wow!”

Thanks for all the tips you’ve shared.

Coming from a print-based graphic design background, I’ve transited to learn web designing some time back.

It was the time when table-based design was the way to go.

When CSS-based web design came about I saw the advantages and jumped on the bandwagon to learn CSS.

Ever since I’ve thrown away all I’ve learned from table-base web designing and have been meddling with CSS.

All this time I was using HTML authoring software cos I’m more a visual designer than coder. I rely on the software’s editors (HTML & CSS) to write the codes. I can’t write them by memory!

But somehow I don’t seem to be able to have any “breakthrough” with my skills, eg. the various cool CSS techniques I’ve seen … on your site, for instance.

Do you think one should learn and memorize the coding syntax by heart rather than depending on the editors in order to excel in CSS-based web design?

Thanks.

Sherman

#i.ndustrio.us - » Clean CSS Customization Method for Wordpress Themes  at 4:53 pm on May 26, 2007

[...] Pearson does nice work. He posted this article on modifying WP themes a few months ago but if you’re interested in hacking your theme and haven’t read it - [...]

#Chris P.  at 1:35 pm on May 27, 2007

Sherman — I definitely think there’s a benefit to knowing and understanding the way CSS and XHTML truly work, especially across a variety of modern browsers. You really have to know what you can and cannot get away with, and at the same time, you should always strive to make things as simple as possible.

To be honest, I think that working with code and exploring new horizons with your design elements are probably the best way to learn, and more than anything, it’s simply going to take time to master the various techniques.

#动画片  at 2:38 am on Jun 1, 2007

Thanks,Chris !good wish!

#K-IntheHouse  at 2:36 pm on Jun 11, 2007

Chris, great article! I am redesigning my website right now and this is a great help. Thanks for the effort..

#Jauhari  at 6:34 am on Jun 16, 2007

CSS is one off powerfull way to make good layout. And understanding CSS is one of key of success ;)

#Paul Montwill  at 2:49 am on Jul 4, 2007

I am getting hungry when reading your post. Please go on. I would like to improve my CSS and Wordpress is a good example to start with and this blog is a great place to learn from. Come on, Chris! We want more!

#Erjati  at 7:59 pm on Jul 7, 2007

Excellent idea but won’t work with a Sandbox based theme as it’s body tag is precoded with:

“>

which results in this, for example:

when the page is generated. To get around this? Probably just move the preferred layout code into the main style sheet and alter the body tag per this post. Sandbox uses secondary style sheets for alternative layouts of sidebars. I’m doing a mod that lets the viewer switch the layout on the fly, but this posts idea won’t work with that in effect.

#Erjati  at 8:02 pm on Jul 7, 2007

Oops. That code didn’t show up. What it should have read was, with * instead of the correct angle brackets:

*body class=”*?php sandbox_body_class() ?*”*

resulting in:

*body class=”wordpress y2007 m07 d07 h18 home”*

#Gary P  at 6:17 pm on Aug 23, 2007

I use DreamHost which has one-click installation of Wordpress and other software. They also have one-click updates. I heavily customized several Wordpress installations, both in the css & in the core php files, and was very nervous about pushing that one-click “Upgrade Wordpress” button! Finally, I tried it on a minor site. It worked flawlessly. I proceeded to upgrade all my Wordpress installations, and all my customizations were retained. Congratulations, DreamHost, I don’t know how you do it, but thanks!

#guy  at 9:21 am on Sep 11, 2007

this is great, going for a site redesign soon so I’m gonna use this tip, plus the YUI grid css…mmmm!

#ohmto  at 11:39 pm on Oct 8, 2007

i was wondering if i need to protect the css file in any simple design in html file not in in the wordpress theme or templete

#ohmto  at 11:43 pm on Oct 8, 2007

this html file linked to an external css file

#dirkhaim  at 4:40 pm on Oct 28, 2007

This is a wonderful solution. However, the theme I am using is actually taking advantage of the body class. So what I did was to open a new span tag right after the body tag, and close it at the end before the body tag closes.

However, for some reason I have issues with this in IE6 (not much surprise) and Opera. This is pretty weird.

Any idea why something like this might happen?

Thanks

#sun  at 8:36 am on Oct 29, 2007

This is a wonderful solution. However, the theme I am using is actually taking advantage of the body class. So what I did was to open a new span tag right after the body tag, and close it at the end before the body tag closes.

However, for some reason I have issues with this in IE6 (not much surprise) and Opera. This is pretty weird.

Any idea why something like this might happen?

Thanks

#Joseph McClellan  at 10:11 pm on Oct 30, 2007

This is such a fantastic idea, I’m grateful to have run across this post. I’m working on implementing this at my website. If you have any ideas or suggestions I’d love to hear them also!

Keep up the fantastic work!

#ohmto  at 7:30 pm on Oct 31, 2007

hey guys
i was note in the second comment that i was talking about a simple html file and its external CSS file . i know that to make all your css code in an external one of simple and nice ways to protect the css code.
but…
you might be miss understood me .. i was asking for a method to protect my external css file cause i designed a website and someone very easily ripped it and even he linked his stolen page with my css file not copied it . so i was search for a way to protect my coming css files :) …. actually one of my friends told me the solution thanks for him .

#New Website Theme - Goldenflower at Antigua Web Solutions Blog  at 8:26 am on Dec 8, 2007

[...] an adaption of the wonderful sunsetidea theme by Robbie Williams. Using a custom.css as described here makes it easy to adapt a theme without altering the original css. The lovely flower image is from a [...]

#WordPress Theme Golden Flower at Antigua Web Solutions Blog  at 8:32 am on Dec 8, 2007

[...] an adaption of the wonderful sunsetidea theme by Robbie Williams. Using a custom.css as described here makes it easy to adapt a theme without altering the original css. The lovely flower image is from a [...]

#Copyblogger : Simple WordPress Themes  at 7:51 pm on Dec 17, 2007

[...] Copyblogger Theme is a single sidebar theme with simple and clean design: black header, white background, and red link. The theme is highly customizable with custom stylesheet solution. [...]

#Blog Artiste | Just another WordPress weblog » How to Protect CSS Mods for ANY WordPress Theme  at 1:03 pm on Dec 20, 2007

[...] Here is the simple way to futureproof your CSS mods and avoid those upgrade headaches forever.read more | digg story « Why console apps still rock OZZFEST 2007 TO HAVE FREE TICKETS » [...]

#Saitia  at 11:48 pm on Jan 15, 2008

Hi Chris,
When I loaded the fabulous NeoClassic theme, I got this underneath Catagories”

Fatal error: Call to undefined function: wp_list_categories() in themes/neoclassical Folder/sidebar.php on line 12

Can you tell me what I need on line 12?

Speak as you would to a child; this is all new to me.

Thanks,
Saitia

#WP - bestehende Themes an die eigenen Bedürfnisse anpassen | bueltge.de [by:ltge.de]  at 2:20 am on Jan 17, 2008

[...] Lösung wurde schon einmal bei Perasonified vorgestellt, leider war sie mir nicht bekannt und ich möchte nun nochmal auf diesen Beitrag [...]

#Jeff Morris  at 9:30 pm on Feb 2, 2008

Nice, so simple & elegant. Thank you, thank you.

#jake dam  at 12:34 am on Feb 14, 2008

i also do this stuff, and well like you i don’t change the main css or the original css because if you mess on your work you must have a clean copy or the original one..

#TomTom  at 12:41 pm on Mar 13, 2008

Really nice post, simple and elegant. Thanks chris

#Rob O.  at 9:12 am on Mar 26, 2008

Thanks Chris…

#Alda  at 7:16 pm on Apr 14, 2008

Hi Chris and everyone,

I’m totally new to all this and am trying to get my head around all these new concepts. The custom.css file sounds like an extremely sensible concept, even to a novice like myself, but if I may just recap to make all this completely idiot proof: I download the custom.css file, make the changes to the header file, save the header file (not sure how I upload it to my server - I was under the impression I’d already done so - no?) … and then I can safely edit all other aspects of the theme and it will still correspond to future upgrades ..?

Am I understanding all this correctly??

Secondly:
Does the Neoclassical theme support the ShareThis plugin? If I’m not mistaken it’s a Wordpress 1.0 version, but the plugin requires 1.5 or higher. If not, any plans for upgrading the theme to support this feature?

- Thanks for the wealth of information here. What a fantastic site!

#Javier Cabrera  at 2:42 pm on Apr 21, 2008

Wow that’s impressive!

#BSoDs.com  at 4:17 pm on Apr 22, 2008

Thought about making a wordpress site, but Drupal seems to have it all.

#Amino  at 3:12 am on Apr 28, 2008

Very useful! A def dig for me! Thanks!

Hoot and/or Holler ↓