This is another one of those times where we are going to kick some of the WordPress knowledge that we have picked up over the years with you. As a bit of background CSS is a technology that adds style to HTML. A CSS stylesheet contains rules that tell a browser how to display a page. Every theme has a stylesheet (style.css) and you could modify it to adjust your site’s layout and presentation. The problem with doing this is that it goes against common sense and best practice. The first reason is that if you start tweaking your style.css file and you mess something up you could completely screw up your site. Now this is only partially a bad idea because many of you could say that you would just back up the style.css file first and that isn’t a bad option but it’s a lot of work to do it every time you want to tweak something. The real reason that this isn’t a good idea is because every time you update your theme the file will be overwritten along with all of your customizations to it. That is where your custom.css file comes in.
In WordPress the custom.css file will usually be located in the same folder with your normal style.css file. The beautiful thing about custom.css is that in areas that you specify it will override your style.css file and during upgrades it is NOT overwritten (though it’s still smart to backup this file every now and then just in case something goes really bad). After that you can upgrade your theme as soon as it needs to be updated without fear that you will have to go back and make all those changes again. Personally, I love to use the custom.css file to make lots of minor changes to my theme. The great thing about using custom.css is that you don’t have to copy your whole stylesheet into it, just the parts you want to change.
For instance this piece of code controls some variables about my sidebar layout including positioning, background color and other stuff. Let’s say I don’t like the color of the background of my sidebar area, I simply grab this piece of code out of your stylesheet, paste it into custom.css, adjust it to what you want it to be and save it. Now you just modified how your site is presented and there is no real consequence for you, if you don’t like what it does or you mess something up with the code in the custom.css file, just delete it and copy the original code for the style.css and try it again.
margin:15px 15px 0 5px;
Many of us want to tweak our WordPress themes and often do not realizing that it will ultimately probably be more trouble than it’s worth. By smartly using the custom.css you can customize your theme to your heart’s content and do it in way that is both low risk and easy. Alright guys that’s enough for now but trust me if you want to customize your stylesheet, use custom.css and save yourself a huge headache. There are WordPress plugins that let you do something similar but as we always say, don’t use unnecessary plugins because it just uses resources that could be used by something else. You don’t have to have a lot of technical knowledge to do this and since you’re not modifying your real stylesheet the worst thing that could happen is you have keep working with the custom.css file until you get your desired effect. Your stylesheet controls all sorts of things from spacing to color schemes and using custom.css allows you to adjust them in a way that has no real risk for you. So what are you waiting for, get out there and start using custom.css to take any WordPress theme and truly make it all yours. Check out a great video from the guys over at WPZOOM on using custom.css (they make great premium WordPress themes by the way).