Dev Tip: Preserve whitespace in HTML without using (nbsp)

If you want to preserve whitespace within an HTML element (div/span) without using non-breaking spaces (and therefore breaking word-wrap), add the following property to the CSS style(s) for that element:


There are more options available for this property as well:

E18 Error Fixed! (Canon PowerShot SD450)

Huzzah! I finally fixed the E18 error I’ve been experiencing on my Canon PowerShot SD450, which prevented my lens from extending when the power was turned on, and the fix wasn’t nearly as difficult as I had expected. I’ve even snapped some shots of the process so that you can follow along at home, and fix your own camera if you are experiencing the same problem that I was.

Canon_Ixus_II_with_E18_errorIf you’re not yet familiar with the E18 error, check out this information on the topic from Wikipedia:

The E18 error is an error message on Canon digital cameras. The E18 error occurs when anything prevents the zoom lens from properly extending or retracting.[1] The error has become notorious in the Canon user community as it can completely disable the camera, requiring expensive repairs.


This is a fairly prevalent problem with the PowerShot cameras, and a class action lawsuit was filed (but dismissed) against Canon:

A Chicago law firm, Horwitz, Horwitz & Associates, has already filed a class action,[4] while the law firm of Girard Gibbs & De Bartolomeo LLP are investigating this camera flaw and may issue a class-action lawsuit against Canon.[5] There is at least one other.[6] Although the suit was dismissed in a court of law, the plaintiffs are appealing.

Fortunately, at least in my case, the fix did not require returning the camera to a Canon repair facility or having to take unreasonably complex steps.

My solution for the PowerShot SD450/IXUS 55 follows:
(You’ll need a very small Philips head screwdriver, #00, to remove the screws)

  1. There are six screws holding the metal frame of the camera body together, two on each side, and two on the bottom. Remove all screws, pop the strap-hook plate (sorry, probably not the most technical term there), then gently lift the front plate off by pulling up from the bottom, and remove the back plate in the same fashion. These should come off relatively easily. This is what the camera should look like as you remove the plates:
  2. Now, looking from the top of the camera, you should see a small motor on the left side, as shown below (it’s beneath the cable with a “22” written on it):
  3. Take your screwdriver (or another small instrument) and gently try to rotate the plastic piece attached to the motor on the left side, as shown below:
  4. At this point, try placing the battery back in the camera (if you have removed it), turn the camera to one of the capture modes, and press the power button. If all went well, your lens should now be able to extend and retract properly.

Further information (and other repair tutorials) are available at the following locations:

Unforunately, the site that had the most comprehensive information about this issue,, seems to be down for the time being. Here’s a quote from their site that I saved in another blog post before the site was taken down:

Canon E18 error happens when the lens gets stuck while trying to extend. The camera will beep a few times and the LCD will display a little E18 in the lower-left corner. The lens gets stuck in the extended position, and refuses to move either to focus the lens or to retract when powered off.

Apparently, people who posted about this incident on forums say they had to send the camera for repair and that Canon has horrible customer support and response time.

Here is how the E18 error looks like. You just get a black screen with small “E18″ sign in the lower-left corner:

The problem usually happens because dirt or sand get into the lens mechanism. But it seems that more and more people are showing, who took great care of their camera, and still started receiving E18 errors.


Please share your experiences with this fix, or the E18 error in general, in the comments below. Thanks for reading!

True-Color GIF Example

The mistaken belief that GIF has a limit of 256 colors probably comes from the way GIF was first used when it came out. In the late 1980’s, PC video cards generally supported no more than 256 colors. Image exchanges were becoming popular among BBS systems and the Internet and viewer programs were quickly produced. No one tried or needed to generate images with more than 256 colors since they could not be viewed on anything less than high priced graphics workstations. Programs that converted images to GIF worked up a number of methods to reduce the number of colors to 256 or fewer. Some actually did a very good job. GIF files were constructed with just a single image block, even though the GIF standard placed no limit on the number of blocks. Since there was no use for more than 256 colors, there was no use for more than one image block. This practice became effectively ingrained into the computer culture and eventually everyone “knew” that GIF supported no more than 256 colors. The fact is, the programs that generated GIF files supported no more than one image block, and thus didn’t have a means to deal with more than 256 colors. The top image shows that a GIF file really can have more than 256 colors.


PNG transparency test

Examine the test images in the left column below. To determine how your browser handles PNG transparency, find the images on the right that look the most similar.

Not all possible results are shown; there are too many combinations of background colors and shapes of the opaque region. However, I intend to include every result that actually occurs in a mainstream browser. If I am missing any, please let me know.

It’s come to my attention that my images which show how alpha transparency should look are not quite perfect in regard to precisely how transparent they are at various points. Rather than try to modify this page to test gamma correction issues as well, I’ve created a separate test page for that.

This test page was constructed by Jason Summers. Comments may be emailed to
There are other test pages listed at the PNG web site.

(via PNG transparency test)