MyCSS
MyCSS is a WordPress plugin that allows you to attach your personal CSS stylesheet to your blog, regardless of the theme you might be using. This is useful for users who want extra control over the presentation of individual blog entries by using self-defined CSS classes without worrying about compatibility issues when switching theme from one to another.
Another reason you might want to use this plugin is if your blog uses other plugins that require CSS styling. While some blog themes support certain plugins “out of the box”, you can style them yourself using MyCSS and make minimal changes as you switches themes since they are all in one place, i.e. my.css.
It is always a good idea to not heavily modify a blog theme’s original CSS whenever possible (to make future theme update easier). Any extra CSS classes you added yourself can be put into MyCSS editor, which will definitely save you time managing your blog’s presentation in the long run.
The closest plugin I found that implements a similar function is “Fixed Stylesheet – Quick n’ Dirty Hack”. However, what is lacking in this dirty hack is the convenience of editing the custom stylesheet. Using this hack, one has to edit the stylesheet using a text editor, upload it to your blog directory via FTP, then only will any changes take place.
MyCSS plugin takes an extra step towards better organizing your custom stylesheet by adding a new panel under “Presentation” menu that allows you to do instant changes to your stylesheet easily. ;)
For your information, this site is powered by MyCSS and you can take a look at the stylesheet to have a feel how would one utilize it.
For advanced users…
If you make heavy use of “Edit CSS” feature found in Firefox’s Web Developer Toolbar while stying your WordPress blogs, then you’ll definitely increase your productivity by having an extra tab opened with MyCSS and copy desired CSS changes directly from Edit CSS panel into MyCSS textbox. Save, refresh, done! :D
Features
- imports user-defined stylesheet, independent of blog theme used
- provides convenient stylesheet editor in admin panel for fast editing
- does not write to your WordPress database
Usage
Once activated, you can either upload your self-defined stylesheet to “wp-content/plugins/MyCSS/my.css” or copy and paste your CSS codes into the editor under “Presentation” menu.
Make sure “my.css” is writable on your server, a “644″ permission should suffice. Below’s the message you’ll see if “my.css” is not writable:
Similarly, if “my.css” cannot be found, you will get the following warning:
Something you should know…
Elements in your blog posting using CSS classes defined in “my.css” will lose their CSS formatting in RSS feeds. This is due to the fact that RSS feed does not support external stylesheet, thus all CSS classes will have no effect in RSS readers.
Tips
Due to the limitation of CSS classes in RSS feeds mentioned above, you should always try to use classes together with standard XHTML tags to allow RSS readers to render those elements closer to the way you intended than completely ignoring your CSS classes. For example:
Example Header
Instead of using <span class=”myheader”>Example Header</span>, you should really use <h2 class=”myheader”>, and the CSS will look something like this (just for reference):
h2.myheader {
font-size: 1.6em;
color: #777;
margin-bottom: 13px;
padding: 10px 0 7px;
border-bottom: 1px dotted #ccc;
}
One of the tips I can give you is that you might want to use “!important” whenever your CSS in my.css does not show up (usually due to conflicts with theme’s stylesheet). btw, I’m no pro at CSS so if any of you know a better way of using CSS classes in your blog entries, feel free to share your opinion here. :)
Installation
- Download and extract the “MyCSS” folder
- Upload the “MyCSS” folder to your WordPress plugin directory, usually “wp-content/plugins”
- Activate the plugin in your WordPress admin panel
Download
MyCSS plugin 1.1 for WordPress 2.5+ (4kb .zip)
If you are using older version of WordPress, please download MyCSS 1.0 from here instead.
| Please donate to support active development of this plugin, thank you! |
If you like this plugin, express your love by donating and sharing this plugin with your readers!
Support
If you have any questions, suggestions, or found any bugs in this plugin, feel free to post them in your comments. I’ll try my best to answer them but there’s no guarantee, so don’t be disappointed if you do not hear back from me promptly. :/ If you find this plugin useful and feel like donating some money for my effort, please use the PayPal button above, thanks! <3
History
1.1 [2008.04.18]
- Updated admin panel markup for WordPress 2.5
1.0 [2006.07.25]
- Initial release




{ 43 trackbacks }
{ 23 comments… read them below or add one }
← Previous Comments
This plugin is absolutely brilliant, just like the website. Eyn, I am so impressed with you. I stumbled on this site while looking for an alternative to child themes. Then I found the writers on this site are also fantastic. Great work everyone. I’m a fan.
Hello Yaosan Yeo,
I worked on a multiblog version for your plugin, you can find some details here :
http://blogs.nofrag.com/__MaX__/2008/jun/24/38301-dev-mycss-improved-v1-for-wordpress/
Let me know if it’s a problem for you :)
MyCSS will not over-ride Theme Editor in Wordpress 2.51 ?
File permissions 644 ok.
宝贝呀!!必备插件儿!!
ótimo! great!
awsome ;)
Under the WP 2.5 admin panel, the text entry area for the MyCSS admin page is restrictively narrow.
It can be fixed by adding a value for “cols” on line #68 of mycss.php – the result looks like this on mine:
rows=”25″ cols=”120″ tabindex=”1″
Fantastic plug-in – thanks for your work!
I’m preparing to go live with a WP-based site that will replace my current (and increasingly stale) static site, and have been busy customizing my chosen theme’s css. And then it occurred to me that it would all be wiped out if I installed the next update to the theme.
Your recommendations regarding Firefox and Web Developer are spot on too.
If I may, here’s a recommendation to those like me who had already done significant work modifying a theme’s style.css page: download a program called Beyond Compare by Scootersoftware. It has been invaluable in identifying and transferring the changes I already made in the theme’s CSS to your plugin, as well as tackling the task of identifying and logging changes to other theme files (mostly php) that I will have to repeat manually upon an update. Very powerful and easy to use…
best,
steve
Awesome plugin, thank you a lot. It makes things a lot easier. I like switching themes too much.
Thank you!
Does it support wp2.3?
hi eyn!
thanks for the great plugin :) i had *just* started editing the core CSS file (and felt horrible doing it) then found your plugin, which solves everything! No more guilty feeling of ‘hacking’ the CSS file anymore :)
thanks heaps!!
pyko
I´a using this plugin.
Very good. :)
Thanks
Martino :)
there a case sensitive problem
the file uses “MyCSS” while the folder is “mycss”
on linux it wont work
Wow… great idea! :D This plugin should have come along sooner~~ one of the reasons why I hardly change themes is precisely because I can never remember which parts I’ve edited ^^: Thanks!
Can someone please help me? I am new to installing wordpress on my hosting account and I downloaded the CSS plug in. I wanna build a wordpress blog and add a customized theme. Can someone e-mail me please and school this ditz on how to do it?
Thank you..:-)
hmm, personally, i think a plugin at hand of which creating javascript trees anywhere on your blog would be handy.
Hi posix, I’m not working on any plugin at the moment, but if you have any interesting ideas feel free to tell me and I’ll see if I can code a plugin for it. :)
And Josh, you might want to try different permission settings for the folder, if it stop working once you change the permission, you can change the permission of “my.css” only instead of the whole folder. I suggest you try out 777 permission on my.css (but not the folder, for security reason) as a last resort, it should work. Tell me if you have any more problems.
I cannot detect the plug in after having changed my folder permission
thank you eyn.
for some reason, when i tried the plugin again, everything worked fine.
it’s beyond me what i did differently before.
well, anyway, i can now fully enjoy this wonderful plugin.
are you working on other plugins? i’d be very interested :)
kind regards,
posix.
ps. sorry for the double-comment earlier.
posix, I went to your page and found that your my.css is working fine, I don’t think it’s being ignored, but rather the way you put in your CSS might be the problem. You might want to use Firefox Web Developer extension to help you debug your CSS, it comes with a handy EditCSS feature that show you real-time CSS changes. You might also want to try using !important in order for certain CSS to show up as sometimes your main theme CSS file might have already styled certain elements, and you need to force your custom style to overwrite those.
hey,
this plugin is what i longed for for ages…
i was so happy to find it.
thanks a bunch for making it.
however, it doesn’t work for me :’(
everything went well with the installation of the plugin and whenever i apply changes it confirms them. there are no error messages saying “can not write” or so.
yet no chages are present.
when i edit the exact same thing in the initial css files of my theme (steve lam’s “true blue” (http://stevelam.org/trueblue/) style for k2) the changes are present.
i don’t understand what i am doing wrong.
i feel more like mycss is being ignored at the moment.
i hope you can help me.
thanks again,
posix.
Hi Daniel, I do know about that plugin you mentioned before I started making this one. Honestly, that plugin isn’t really doing what I wanted, and its implementation goes against what I’m trying to achieve here. First of all, MyCSS does not touch your WordPress database, so user can feel free to enable and disable this plugin without worrying about leaving “traces” behind.
Also, why would someone need multiple “cross theme” stylesheets when the whole purpose of having one is to make managing theme independent CSS classes easier? The reason of me using MyCSS is to group plugin related CSS classes and custom classes I’ve used in my blog post. I want them to be valid even after I switch to a new WP Theme.
One can easily organize CSS classes within a single stylesheet using proper commenting.
Have a look at this… it also overrides the themes css, can be changed in the admin panel. you can create multiple css files and toggle them on or off without aczually deleting them, as they are sotred in the database.
http://scott.sauyet.com/php/wp-plugins/stylesheets/