Even if you’re an absolute beginner, making changes to an existing CSS style sheet is not complicated. Yes, there are things you need to learn, and computer code is often unforgiving, but as I hope I explained in the previous post the basics are easy to grasp. Fuel your own initiative with a reference site like W3Schools, where you can pick up tips and information as needed, or even try out techniques before implementing them, and the only thing standing between you and success will be the bitter realization that an innocent misstep may lead to hours of hysteria because you don’t know how to protect yourself from your own ignorance. So let’s solve that problem.
Whatever goals you have for learning or even just tinkering with CSS, the first thing you need to do is see those goals in context. Yes, finding the exact right shade of green for your hyperlinks is important, but so is ensuring the stability and functionality of your site. There’s nothing inherently dangerous about making changes or even making mistakes when you’re working with computer code as long as you know how to protect yourself from inevitable errors. That protection begins with making sure you can always get back to the most recent stable build, even after you’ve made (and forgotten about) multiple changes.
1. CTRL-Z IS YOUR FRIEND. CTRL-Y IS YOUR OTHER FRIEND.
If you’ve been using a computer for any length of time you probably know that pressing and holding the Control (Ctrl) key, then simultaneously pressing the Z key will undo the most recent action in many applications. Most word-processing and image-editing software uses this convention, and the same holds true for many of the applications used to edit CSS style sheets.
If you make a change to the CSS in your style sheet, then upload the change and get results you’re not expecting, you can usually press Ctrl-Z to undo your mistake. Since mistakes are quite often unintentional you may not even be sure what you did to cause the problem, so Ctrl-Z can be a real lifesaver. Even better, many applications allow for multiple undos, so you can go back through five, twenty or even fifty edits. (Check the documentation to determine the exact number.) Since some mistakes become apparent only after multiple changes, Ctrl-Z may be the only way to step back through the sequence that triggered the problem.
What many people don’t know is that holding the Control key down and pressing the Y key will often redo an action, meaning between Ctrl-Z and Ctrl-Y it’s possible to go backwards and forwards through your most recent changes. For example, maybe you made a change but forgot what the original value was and suddenly realize it’s important. With Ctrl-Z and Ctrl-Y you can cycle back and read the value, write it down on a piece of paper or copy it to a separate document for reference, then cycle back to where you were. (What you must not do is cycle backwards with Ctrl-Z and make a change unless you’re sure you won’t need to press Ctrl-Y again. Any change you make when you go backwards with Ctrl-Z necessarily starts a new Ctrl-Y sequence in the application’s memory at that point.) [ Read more ]