Book Review: Defensive Design For The Web

Published November 13th, 2006 under Reviews, Usability & Accessibility, Web Development
by Mashhoor Al Dubayan
Defensive Design For The Web

What you will learn:

Defensive Design for the Web contains 40 guidelines that basically revolve around three things:

  • Clearly and politely telling your web site’s visitors what to do and/or what to expect.
  • Avoiding things that cause frustrations, and providing helpful “help” wherever and whenever they need it.
  • Helping your visitors recover from different kinds of errors and dead-ends.

Read the rest of this entry »

Pixel To Percentage Conversion In CSS

Published September 29th, 2006 under CSS, Web Development
by Mashhoor Al Dubayan

As you might already know, Internet Explorer won’t allow its users to resize a Web Site’s text if its font-size has been defined using pixel units.

To overcome this issue, you need to define your font size using percentages. Percentages define the font size of an element relative to the font size of its parent element, which might be a bit confusing, especially if you’re used to using pixels. But I’ve recently been shown a simple trick that enables you to convert from pixels to percentages :

Most browsers set the font size to the equivalent of 16px by default. To convert the pixel value we need to percentage, we do the following :

  • For a 13px text: 13 / 16 = 0.8125 = 81.25%
  • For an 18px text: 18 / 16 = 1.125 = 112.5%

The examples should be self-explanatory. We just move the first three digits (from the left) of the results to the left of the floating point to get the percentage value. Note that if the element’s parent’s font-size has been set to 14px (for example), then you need to divide by 14, not 16.

I personally won’t bother with percentages just to support Internet Explorer, but this might be handy in future projects.

Emphasize key words. Make your text scannable.

Published September 17th, 2006 under Usability & Accessibility, Web Development
by Mashhoor Al Dubayan

This is a technique I’ve been using in the local FAQ at work which, as I’ve been told, makes people find the answers they’re looking pretty fast.

Say we had this simple FAQ about accounts at example.com:

  • How do i activate my example.com account?
  • What are its limitations?
  • What happens after the trial period expires?
  • How do i renew my subscription?
  • How can i reach technical support?

Users will have to read every question in order to find the answer they’re looking for. Some might even skip it if it had a lot of questions, which is besides the point.

Now let’s see what it would look like after emphasizing the key word(s) for each question:

  • How do i activate my example.com account?
  • What are its limitations?
  • What happens after the trial period expires?
  • How do i renew my subscription?
  • How can i reach technical support?

Now that key words are emphasized, users will be able to scan this FAQ much faster; all they need to do is search for the words that are relevant to their question. Some will even be able to spot the question they want at first glance. Try not to emphasize too many key words though, as it will only end up confusing readers.

Of course, this also applies to paragraphs, not just lists , as long as you emphasize key words intelligently.

Top 10 Web Annoyances

Published August 10th, 2006 under Personal, Web Development
by Mashhoor Al Dubayan

In this post, I compiled a list of the 10 most annoying things I experience on the web. There are more annoyances out there, but since these 10 annoyances popped up in my mind first, then they probably are the most annoying things on the web for me.

10. Web Development misconceptions

People Who think that:

  • Whoever “knows” HTML can write decent markup.
  • JavaScript isn’t worth learning since many scripts’ websites are available online.
  • FrontPage is the best choice (or even an option) for designing web sites.
  • PHP is a language for amateur programmers.
  • CSS-based layouts are just a fad.
  • “Graphic Designers” are the ones responsible for “Web Design” since both names share the “design” part, even though Web Design involves coding.

And a few other things I don’t recall right now.

Read the rest of this entry »

Javascript Includes

Published July 19th, 2006 under JavaScript, Web Development
by Mashhoor Al Dubayan

That’s one thing I’ve always wanted to do in JavaScript - calling a script from within another script, like the @import command in CSS or include in PHP/C/C++. JavaScript doesn’t support this natively. I thought there’s no workaround until today my friend, Egor Kouchnarev, who is web designer, asked me whether it’s possible to do this using document.write to write some <script /> tags/links in a document’s head. It was a pretty good idea, except It’s better implemented by manipulating the DOM.

Read the rest of this entry »

« Previous PageNext Page »