DITCHWALK

A Road Less Traveled

Topics / Books / Docs

About / Archive / Contact

Copyright © 2002-2023 Mark Barrett 

Home > Archives for CSS

Five (More) CSS Tips for Beginners

February 19, 2014 By Mark Leave a Comment

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 ]

Filed Under: Ditchwalk.com Tagged With: CSS

The Most Important CSS Tip for Beginners Ever

February 16, 2014 By Mark 4 Comments

This isn’t the first time I’ve tinkered with a website or tweaked a WordPress theme, but as usual it feels like it. While I do remember a few things from previous style-sheet adventures, as with all things tech the horizon is constantly receding, and what once seemed like bedrock knowledge has become obscured by an ever-evolving feature set.

In the face of such inevitable changes the only options are to stay constantly up-to-date or effectively start from scratch each time. Because nobody in their right mind would stay up-to-date on CSS if it wasn’t paying the bills, it’s probably safe to assume that any CSS hacking you intend to do is driven more by your desire to have things just so than it is by a love of code. You want things to look the way you want them to look, but because money is an object you either have to suffer the indignity of off-the-rack blogging or make those changes yourself.

I feel your pain. In order to prevent you from feeling some of the pangs and jolts I’ve experienced, however, I thought I would pass along one tip I’ve never forgotten, which has saved me more time and trouble than the sum of all the CSS knowledge I’ve gleaned from websites, books and kind strangers who took pity on me. For all I know this is a common practice even among CSS professionals, but if that’s the case it’s considered so obvious that nobody mentions it when offering tips to absolute beginners. I stumbled upon it myself by accident and only belatedly recognized it as a means of preventing the kind of frustration and disorientation that can, in more advanced cases, lead to a seventy-two hour psych hold. Sure, you laugh — or at least I hope you do — but don’t laugh too hard because CSS can perplex almost anyone.  [ Read more ]

Filed Under: Ditchwalk.com Tagged With: CSS

Acronyms From XHTMLHELL

March 31, 2010 By Mark 2 Comments

For my own reference, as well as that of readers who are in the same boat, I pulled together the following links to help make sense of the alphabet soup inherent in self-publishing solutions. My objective is simply to provide a single post that will replace the repeated searches I’ve been running whenever I can’t remember how XML is different from HTML is different from XHTML.

  • Brian O’Leary, in a post titled Alphabet Soup, tackles the issue head on. If you get confused by XML, HTML and XHTML, this is the post for you.
  • In a post titled Web Standards for E-books, Joe Clark dives deeper. There’s a lot here and I’m not sure I understand or agree with all of it, but it definitely wrestles with the issues I’m wrestling with.
  • Gizmodo leads with a tabloid headline: Giz Explains: How You’re Gonna Get Screwed By Ebook Formats. Despite the hype the article is still worth a read, in large part because it projects all these tech issues onto the current marketplace. Again, I’m not sure I agree with the conclusions, but the article frames the right debates.
  • Jedisaber has an .epub eBooks Tutorial that I found extremely helpful. It includes a list of tools, with commentary about same, as well as many other useful bits of information. If you’re thinking of creating an ePub file, this is the place to start.

As suggested in a recent post, it’s always a good idea to look for work flow examples that you can copy or emulate. You may not agree with all of the other person’s choices, or need to follow their examples word for word, but anything is better than reinventing the wheel.

Where the rubber meets the road for me in all this jargon is getting my content distributed. I am concerned about embarking down a technological path that either dies out or takes my content hostage. I don’t want to have to keep changing native file formats, or create new documents for new services or sites that use proprietary tools as a means of also holding customers hostage. I’m interested in flexibility and utility and portability, and I’m constantly judging tech solutions by those criteria.

Update: Keith Fahlgren has a post about ePub and CSS that’s worth reading, if only to give you an idea of what’s coming in terms of compatibility issues. In the comments to the thread, Liz Castro says, “It’s browser wars all over again,” and I fear she may be right. My one hope is that the maturity and deep pockets of many of the market players will keep the insanity to a minimum.

— Mark Barrett

Filed Under: Publishing Tagged With: CSS, e-books, ePub, Publishing