March 28, 2012

Snap Backup + Dropbox = Free Cloud Backup

It's straightforward to backup your computer data files to the cloud by using Snap Backup together with Dropbox.  Snap Backup is an open source (free) desktop backup utility, and Dropbox is a web-based file hosting service that offers 2GB of free network storage.  Backing up to the cloud means your data is safe even if your computer is stollen or destroyed.

Steps to Setup Cloud Backup:
  1. Download and Install Dropbox
    Get the installer at:  www.dropbox.com
  2. Create "Backup" Folder
    Locate your new "Dropbox" folder (it will be under your Home or Documents folder) and create a folder named "Backup" inside your "Dropbox" folder.
  3. Download and Install Snap Backup
    Get the installer at:  www.snapbackup.org/download
  4. Designate Folders and Files to Backup
    Launch Snap Backup and use the "Add File" and "Add Folder" buttons to identify the files you want to backup.
  5. Configure Archive to Dropbox
    Check the "Copy Backup To:" option and then use the folder chooser button to select the "Backup" folder you created in step #2.  Click "Save Settings".

To perform a backup, launch Snap Backup and click the "Backup Now" button.

Archive Option on Apple Mac OS X

Backup in Progress

Archive Option on Microsoft Windows

January 1, 2012

Pure CSS Navigation Bar with No Image Files or JavaScript

A navigation bar styled purely with CSS is easier to modify and reuse than one dependent on image files or JavaScript.

Pure CSS Navigation Bar

HTML for a navigation bar (a flat menu bar also called a nav bar or link bar) should contain just the list of buttons with their respective links.

<ul class=navigation-bar>
   <li><a href="#a">Alligator</a></li>
   <li><a href="#b">Bullfrog</a></li>
   <li class=current><a href="#c">Cheetah</a></li>
   <li><a href="#d">Dolphin</a></li>
</ul>
Example Navigation Bar HTML

Pure CSS Navigation Bar uses CSS to layout the buttons horizontally by disabling list-style-type and displaying the list items as table-cell elements.

ul.navigation-bar {
   list-style-type: none;
   background-image: -webkit-linear-gradient(top, silver, midnightblue);
   background-image:    -moz-linear-gradient(top, silver, midnightblue);
   background-image:     -ms-linear-gradient(top, silver, midnightblue);
   background-image:         linear-gradient(top, silver, midnightblue);
   border: 2px solid dimgray;
   padding: 0px;
   margin: 0px;
   background-color: midnightblue; /* IE6...IE9 */
   *line-height: 3.2em; /* IE6,IE7 */
   }
ul.navigation-bar li {
   display: table-cell;
   *display: inline; /* IE6,IE7 */
   }
ul.navigation-bar li.current, ul.navigation-bar li:hover {
   background-color: rgba(255, 255, 255, 0.2);
   }
ul.navigation-bar li a {
   display: table-cell;
   text-decoration: none;
   outline: none;
   font-size: 120%;
   color: white;
   border-right: 2px solid dimgray;
   padding: 15px 25px; /* sets button size */
   }
Pure CSS Navigation Bar

Try it out:
The color for the navigation bar in the example screenshot is midnightblue.  Other professional looking colors for the navigation bar include firebrick, seagreen, sienna, darkslategray, and dimgray.

Pure CSS Navigation Bar will work on sites that validate to strict HTML or HTML5.  And it follows a progressive enhancement strategy in that the navigation bar will display and function correctly for most all web browsers while providing improved visual effects for standards compliant web browsers.

December 20, 2011

Simple Workaround for Strict HTML Validation of _blank Target

There are times when it's legitimate to automatically open up a link in a new tab or window of the user's web browser.  Setting the link's "target" attribute to "_blank" used to be the correct way to realize this behavior.

<a href="http://www.snapbackup.org/" target="_blank">backup</a>
Obsolete Usage

Partly because the target expresses behavior instead of content, the "target" attribute has been depreciated and does not pass validation for strict HTML or HTML5.  There's a cheap and dirty JavaScript trick that achieves the desired behavior and still validates.

<a href="http://www.snapbackup.org/" onclick="this.target='_blank';">backup</a>
Compact (and valid HTML) Workaround

Example link with "_blank" target:
This workaround does pollute the semantics of the HTML with behavior instructions, but it's compact, easy to understand, and validates.

For sites with jQuery, you can keep the HTML cleaner by using the "rel" attribute to designate external links and then adding targets with a jQuery selector.