Archive for February, 2009

Increase Performance with CSS Sprites

Tuesday, February 24th, 2009

CSS sprites allow you to decrease the number of individual HTTP requests sent from the client (browser) to your web server when a user visits your web page.

The concept is simple — instead of an individual icon for each rollover state and visual representation, group them all into one image file and then dynamically position it with fixed width/height rules in CSS.

This avoids the annoying “IE flicker” bug that designers have experienced from time to time when using separate images for “on” and “off” states.

Besides combining an “on”, “off”, “active”, “visited” state for an icon, you can also combine all the distinct icons into one image.

Lets look at a simple example that uses on/off states for icons in a navigation menu:

HTML:


		<ul id="nav">
				<li id="email"><a href="#" title="Email">Email</a></li>
				<li id="phone"><a href="#" title="Phone">Phone</a></li>
				<li id="sms"><a href="#" title="Short Message Service">SMS</a></li>
		</ul>

CSS:


<style type="text/css">
		body { font-family: 'Lucida Sans Unicode', 'Arial Unicode MS', sans-serif; font-size: 76%; margin: 1em auto; }
		#shell { border: 1px solid #ccc; }

		#nav { list-style-type: none; color: blue; }
		#nav li { margin-bottom: .5em;  }
		#nav a:link, #nav a:visited, #nav a:hover, #nav a:active {
				outline: none;
				background: url('/demo/images/sprite_nav.png') no-repeat left top;
				display: block;
				height: 32px;
				width: 32px;
				border: 1px solid #7faacc;
				text-indent: -9999px;
		}

		#nav a:hover { border-color: #4d8aba; }

		/* email background sprite */
		#email a:link { background-position: 0 0; }
		#email a:hover { background-position: -32px 0; }

		/* phone background sprite */
		#phone a:link { background-position: 0 -32px; }
		#phone a:hover { background-position: -32px -32px; }

		/* sms background sprite */
		#sms a:link { background-position: 0 -64px; }
		#sms a:hover { background-position: -32px -64px; }
</style>

An example sprite_nav.png sprite image:

CSS Sprite Navigation

Working demonstration:
CSS Sprite Demo

The sprite image will be a 2×3 matrix of 32px by 32px icons (one column for each state — hover, link) and one row for each navigation item (phone, email, sms).

Further reading: Website Optimization: CSS Sprites, MezzoBlue: Sprite Optimization.

VN:F [1.8.4_1055]
Rating: 0.0/10 (0 votes cast)
VN:F [1.8.4_1055]
Rating: 0 (from 0 votes)

LG VX8700 Review

Sunday, February 15th, 2009

The LG VX8700 is a slick looking phone without a lot of frills, and misses the mark in respect to usability.

Pros

  1. Looks cool…low profile
  2. Voice dialing
  3. Not a lot of “frills”
  4. 1.3 MP Camera
  5. Video
  6. 1000 contacts in the addressbook

Cons

  1. Non-standard plug for data and headphones. The phone comes with an adapter to fit a standard headphone jack, but is rather bulky and completely useless in the event you left it in another car.
  2. Heavier and wider than the Motorola RAZR v3
  3. Screen is not as wide as the RAZR, but does make the phone a bit skinnier
  4. The data interface is not USB, as is the case with most modern phones. This is yet another accessory you must by, and carry with the phone at all times. I ordered a USB cable that plugs into the non-standard plug on the phone….do not know yet if it will charge the phone from the cable->laptop as my old PDA phone did.
  5. No games are included. You must buy a game to play one. My old LG phone had 2 or 3 games installed by default, as does the RAZR.
  6. Usability lacks on the LG VX8700. There are no bumps to indicate which key you are on, and the arrows are difficult to use, even when looking at the phone. This is a hinderence when driving, as I like to be able to hit keys without taking my eyes off the road.
  7. The RAZR has a bump on the “5″ key, and the arrow keys have some relief to them to ensure your finger is on the key without having to look.

Here are the manuals for the Motorola RAZR v3 and the LG VX8700.

Only one volume control setting for the entire phone. There is no way to make the ringer volume “low”, and the call volume “high”.

VN:F [1.8.4_1055]
Rating: 0.0/10 (0 votes cast)
VN:F [1.8.4_1055]
Rating: 0 (from 0 votes)

Jeremy Sydik on Accessibility podcast “Design accessible web sites”

Friday, February 13th, 2009

Following are a few notes I took from Jeremy Sydik on Accessibility podcast “Design accessible web sites”.

Legal Reasons:

  • 508, government requires it to provide service or contract.

Commercial Reasons:

  • multi-billion market
  • iPhones, mobile devices
  • video game consoles.
  • even some televisions are on the horizon that have browsing capabilities

Accessibility Reasons:

  • Colorblind
  • Images/Video/Sound may be unavailable
  • Rollover flicker may cause seizures
  • Text alternatives
  • Use widely available technologies
  • Use clear language to communicate message
  • Navigable content
  • Users with mobility impairments
  • If you’re not usable, you’re probably not accessible
  • Some users turn off presentation layer
  • Progressive enhancement for features, degrade gracefully — start with the basics
  • Catchall – encounter new technologies, apply accessibility rules above
VN:F [1.8.4_1055]
Rating: 0.0/10 (0 votes cast)
VN:F [1.8.4_1055]
Rating: 0 (from 0 votes)