Affiliate marketing beginner tip: Safe CSS

Now playing:
Brand New Day by Forty Foot Echo

What is safe CSS? Basically, it's having a safety net when you start messing around in the CSS of your site. Let me explain.

CSS stands for Cascading Style Sheets. The code in your stylesheets controls the appearance of your site from one central location.

Imagine a world without CSS: Say you wanted to change the font of your headlines, but you have 96 posts on your site so far. Can you imagine how time-consuming it would be to go in to edit each of those posts, select the headline, and change the font? With CSS, you change the font in one central location, and it changes everywhere.

Anyway, many affiliate marketing beginners are a bit fearful of mucking around in the code of their site, and I can certainly understand that. I've had plenty of hair-pulling moments while trying to make modifications to a theme (still do on occasion). How can you minimize the anxiety?

Practice safe CSS. BEFORE you start making changes to your stylesheet, save the original. Here's how to do that:

In your WordPress administration panel, go to Appearance > Editor. Find the stylesheet on the right-hand side (usually called style.css). Select and copy the entire body of code you see in the main box.

CSS style sheet

Paste it into a plain text document, such as Notepad or TextEdit. DON'T paste it into Microsoft Word. Word is like a germy toddler; you'll pick up who-knows-what from it, meaning you might end up with some extraneous characters in your document that will mess up your code. Save the text file somewhere you'll remember, such as right on your computer desktop.

Now play around with the code with abandon. Change things, save using the Update File button at the bottom, and go see how it has affected your site. This is the best way to learn CSS—by doing. Not that you need to know a ton of CSS in order to do affiliate marketing, but knowing some basics can help when you want to change an attribute or position something precisely.

If you mess it up so badly that your site looks like the aforementioned germy toddler's finger-painting project, you don't have to freak out. Just open the document you saved with the original CSS code, copy it and paste it back in. You can either start over or decide you like it better the way it was anyway. :)

This tip is helpful when you're changing things in any of the files on your web site, not just the stylesheet. Get into the habit of saving the original first, and you'll never go bald. At least not completely.

{ 1 comment }

Patricia Hines October 23, 2010 at 9:04 am

Yes, Laura you are so right. I feel like you are talking directly to me. I usually practice safe CSS and have successfully done a lot of tweaking. For some reason though when I wanted to make a change in my footer.php file I did not save it first, it is a small page anyway! Needless to say I did not get the results I had expected, but had made a nice bouncy site! My idea of what to do to keep me from self sabotaging myself is to save a copy of each and every .php and stylesheet in Wordpad as of a certain date. That way if I get a wild hair to tweak something or another I will have my last working copy of the sheet saved so that I can restore it.!

Laura, one think I know for sure is that if I didn’t have you to call on when I do something wrong and am unable to accomplish what I need to change, my site would be sitting parked, and forgotten. Instead it is growing and falling together nicely.

Thanks Laura.


Comments on this entry are closed.

Previous post:

Next post: