Category: HTML5

Client Showcase: Madison Green Box

Moving a business across state lines can be difficult in that you have to re introduce who you are and what your business can do.  In the spring of 2011, Brit moved from the rocky mountains of Colorado to the dairy queen lands of Wisconsin.  Continue Reading..

Creating Equal (Fixed Width) Columns With CSS

Suppose you’re designing a webpage where content is in multiple columns, each of thich has a different background. It looks pretty stupid if the columns end in different places, doesn’t it? If you program WordPress themes or similar, it can look REALLY bad. So how can you make sure the columns line up?

If each column has a fixed width, it’s actually pretty easy.  Put all of the columns inside a fixed-width container, and set the background for that container to be a repeat-y image that has the appropriate background color for each part of the row. This technique was popularized by Dan Cederholm in 2004, in his article on Faux Columns.

When the columns have variable widths, it’s a bit more difficult. But that’s an issue for another post.

The CSS !important Specifier

One of the challenges people new to Cascading Style Sheets face is figuring out why the rule they just coded doesn’t seem to be doing anything. Once you start building more complex websites, it’s likely that several rules will apply to a single HTML tag. In some cases, all of the styles can be applied; for example, you could say that everything in your content area will be colored green, then say that your paragraphs will have size 12 font, and you’ll end up with green, size 12 text. But what happens when styles contradict?

As it happens, you can (mostly) figure out which style will take precedence by doing a little math. If you’ve used an inline style applied directly to the element in question, it has weight 1000 (and almost certainly wins). Otherwise, add up 100 for each ID in the style, 10 for each class, and 1 for each element. Psuedo-classes (such as :hover) cound the same as real classes, as do attribute selectors (such as [type=”submit”]) Psuedo-elements (such as :first-letter count the same as real elements. Highest number wins!

In case of a tie, whichever specifier is encountered last is considered to be more important. This applies to both internal and external styles, so if you import several external style sheets, whichever one is important last will win all ties.

So what do you do if your new style doesn’t seem to be working? Well, from a practical standpoint, the first thing to do is make sure you haven’t mistyped anything, maybe mistyped a class name or used a . where you need a #. After that, the best thing to do is to make your selector more specific – that is, add more IDs and classes to give it greater weight –  so that it will override the less specific selectors.

However, if you have a style that absolutely MUST apply in all situations, you can use the !important selector.  (Does anybody else read that as saying “not important”?) This selector applies only to one particular property, not the entire block. For example, suppose I have this code:

#container {
color: black !important;
font-family: ‘Cambria’, ‘Times New Roman’;

#content {
color: red;
font-family:Arial, Helvetica, sans-serif;

Any text that is inside the content box, which is inside the container, will be in Arial…but it will be black.

The !important statement should be used only sparingly; not only do you not want two !important statements to ever apply to the same line of code, but it’s a real pain to have your selector not working because there’s an !important line somewhere in your external style sheets!

Terminology for Internet Marketing

As with any technical field, online advertising has its own terminology and set of TLA (three letter acronyms). Today let’s review some of the more important ones.

CPA: Cost Per Action. In this case, you get paid (or pay someone) when the user takes a predefined action, such as signing up for a credit card.

CPC: Cost Per Click. Self explanatory. This is the model under which Google Adsense generally operates.

CPM: Cost Per Thousand (page views). M is the roman numeral for 1000.

CTR: Click-Through Rate: how often do people click on your ads?

PFP: Pay For Performance; you get paid if your advertising is successful. See also CPA/PPL/PPS.

PPC: Pay Per Click

PPL/PPS: Pay Per Lead/Sale

PV: Page View

SEO: Search Engine Optimization; this is the process of getting your website to rank highly in search engines, particularly Google. A similar term is SEM, Search Engine Marketing, which also includes paid advertising.

Website Usability, Part V: Don’t Annoy the User

It seems obvious, but many sites seem to have a problem with it: if you want your users to keep coming back, don’t annoy them! Here are a few common-sense things to avoid.

  • No unsolicited windows. If you use pop-ups on your site, half your users will be using a modern browser that blocks them, and you’ll annoy the rest. Find a better way to get attention.
  • Arrange the website logically. Don’t make the user think about how to find something; it should be obvious.
  • Provide a search; we mentioned this before, but it bears repeating. Today’s users don’t want to click around looking for things; they want to jump straight to their target.
  • Be consistent. Again, this is something we mentioned before. If your navigation bar is on the left on your homepage, it should be on the left on every other page as well. A user attempting to search should know exactly where the search box is without having to, well, search for it!
  • Don’t make the user do work that the computer can do; one particularly annoying example is when the same information must be input in several places.
  • Avoid making the user remember things. If two or more items must be compared, place them side by side.
  • Design efficient pages. Even if you expect most users to be on broadband, remember that large images still take time to load, and a bored user is a lost user!
  • Don’t make users lose their work! If a page must time out, warn the user and give him a chance to extend the timer or save his work.
  • Design webpages so that they can be printed; long, complex documents in particular are often printed for later reading. If needed, the page can use different style sheets for viewing and printing.
  • When users must wait for something to complete, give them a way to track progress; for particularly long tasks, such as large downloads, provide an estimate of how long the task will take.

Website Usability, Part IV: Arranging Page Elements

One aspect of designing an effective webpage is to make it easy for users to find what they’re looking for. Overly cluttered pages, for example, tend to confuse users.

Users anticipate where things will be; don’t surprise them! Users expect that important items (such as the navigation bar, as we discussed in part 2) will be in the same place on every page, near the top. Never put important items “below the fold”! Users should never need to scroll to find navigational items, such as search boxes.


Eye-tracking studies have shown that users first look at the top of a page, then at the left side, then the right side; this is why those have been popular locations for banner ads. Important information should be placed in these areas so that users are sure to see it, while less important information should be placed lower down on the page; this helps users to process it more easily.

One thing that makes scanning a webpage for information difficult is when it is too densely packed; not only do users have an easier time searching spare areas of the page, they tend to visit those areas quickly. Lesson: don’t cram important information into too small a space! On the other hand, too much whitespace wastes time by causing users to scroll unnecessarily; effectively using whitespace allows you to place plenty of information on the page without it feeling cramped.

When possible, it’s best to use a fluid page layout so as to utilize the user’s entire screen; designing for a particular screen size inevitably means the page will display improperly for most users. However, be sure that items are aligned consistently, as this makes them easier to scan.

The proper length of both the webpage and the lines displayed on that page depends on what type of content is being displayed. Longer pages are appropriate for uninterrupted reading, while homepages, navigation pages, and those that need to be browsed quickly should be shorter. Users prefer shorter line lengths, but read faster when longer line lengths are used, so the choice is a trade-off between user preference and usability.

Website Usability, Part III: Text

One website that I tend to avoid if at all possible is MySpace; too much of it seems to be pages composed with horribly clashing colors, backgrounds that don’t contrast well with the text, and other things that make them difficult (and annoying) to read. I would go so far as to call the typical MySpace page an excellent lesson in what not to do. What can we learn from them?


Formating your text

If you want people to to read your site (rather than hitting the back button), make it easy for them. Use 12-point (or higher) resizable text, preferably dark text on a light background. Choose one font, preferably a standard one such as Times New Roman or Arial, and stick with it. Typing in all-caps has been considered annoying since the earliest days of the Internet; use appropriate capitalization!

Be consistent

As mentioned, you should choose one font to use for the entire site; common page elements should also be consistent. Navigation bars, for example, should be in the same location on every page.

Attracting Attention

A number of elements are designed for attracting attention; use them sparingly. For example, this page uses bold headers to let the reader know what each paragraph will be about; randomly bolding words throughout the document would only lead to confusion! Animation in particular should be used sparingly;  it should convey useful information that the reader needs to know immediately, or users will simply find it annoying. Additionally, use emphasis (bold, italics, etc) only on short phrases, and never use underlines for emphasis as users are programmed to regard underlined text as links.

Remember: making it easy to quickly scan webpages for important information makes them more useful to the user; avoid using attributes that can be distracting or make the page difficult to read. Strive for simplicity in design; don’t change how information is being presented simply for the sake of variety.

Website Usability, Part II: Accessibility

By law, all websites owned by the US federal government must comply with the Section 508 Federal Accessibility Standards. For private sites, such compliance may not be legally required, but it’s still a good idea; adhering to standards ensures that all of your potential customers can utilize your site.


The main component in designing an accessible website is ensuring that any non-text element, be it photos, music, video, etc, has a text equivalent; this can mean adding descriptive text to a photo or subtitles to a movie.  Some of the most common disabilities include:

Hearing Loss
Ensure that any audio that is required to fully use the site has accompanying text; for example, you can add captions to a video using software like Camtasia, and provide transcripts of podcasts. In many cases, audio-to-text programs like Dragon NaturallySpeaking can do much of the work for you.

Vision Loss
Designing for vision loss often means desiging for screen readers, which has the side benefit of making your website easier for spiders as well. Ensure that alt tags contain useful information, and consider that blind users may not be able to tell if part of the screen updates without a page reload. People using screen readers may also appreciate being able to skip repetitive navigation links, rather than having to wait for the entire menu to be read out every time. Finally, ensure that all elements are accessible using the keyboard only.

A significant percentage of the population has difficulty discriminating colors;  avoid using color as the only way of transmitting important information, and choose high-contrast color combinations. There are tools available that allow you to view your website as it would be seen by people with various types of colorblindness; you can also read more about optimal color choices here.

When adding movie captions, etc, be sure that related information is synchronized; captions become annoying rather than helpful if they show up too late! CSS is a great thing for designing accessible websites, as it encourages thinking about content separately from style; be sure that it’s possible to read the page and have it make sense without loading the associated stylesheets.

Ensuring that your website is accessible can be a pain at first, but your customers will appreciate it. It’s always worth a little extra effort to have your site read by the widest possible audience!

Website Usability, Part 1: Search

One issue that plagues both software and web development is adding in features that sound cool, but confuse the user. What makes perfect sense to the designer often doesn’t make quite as much sense to someone using the software or website for the first time! Let’s talk about a few things that contribute to usable websites. We’ll start with one of the simplest: search.


Placing the Search Box

These days, users expect to see a search box; this is particularly true for ecommerce sites. Don’t make them hunt for it! It should be located near the top of the page, easy to find, and obvious (users should know without thinking about it that this is your search box). This doesn’t just apply to the homepage, either; every page of the site should have the search box, in the same place. Additionally, the default should be to search the entire site, not just the section the user is in; you may opt to provide a checkbox to restrict the search to the current section. As with any rule, there are exceptions; you might, for example, choose to restrict a blog search to the contents of that blog, as we’ve done here.

Handling Search Queries

Users generally expect to see the same results regardless of how they capitalize the query; your search engine should be programmed to ignore case unless there is a good reason to do otherwise, in which case (no pun intended) you can make case-sensitivity a selectable option.

Users often don’t know exactly what term to search for; it is helpful if your search engine understands related terms. For example, a user who searches for “food” might be interested in results for “cooking”, even if the word food never actually appears on the cooking page. One option is to show users a list of related terms that they can search on, and to attempt to correct misspellings. Consider Google: when typing, it offers suggestions for what term you might want, and if you search for what it believes is a misspelled word, it offers the correct spelling.

Design for the Average User

Remember that most users won’t search for long-tail keywords or use boolean queries; they’ll type 2-3 words into the search box and expect to get reasonably relevant results. A good search engine will make it easy for the users to define exactly what they’re searching for, even when the users can’t find (or spell) the correct search terms.

Feel free to provide advanced search options for power users, but don’t let them clutter up the basic search and confuse your new users. As in many things, strive for simplicity; your users will appreciate it.

HTML V, Part VI: What Time is it?

In part 1, we mentioned the <time> tag available in HTML5. The tag is pretty versatile, and allows  you to specify the date, as well as the time and timezone if desired. While every attribute in the tag is optional, if the datetime attribute is used it must be an exact, positive date on the proleptic Gregorian calendar – no partial dates (June) or negative dates (3 BC). At its simplest, we could write something like “it is now<time>3:56 PM</time>“. If you view the HTML source for this article, you’ll see that “3:56 PM” in the previous sentence actually is surrounded by <time> tags. Why doesn’t it look any different than the surrounding text? Like many of the new tags in HTML5,  isn’t intended to change how the webpage displays; rather, it provides additional semantic context that can be used when the page is interpreted. A calendar plug-in, for example, could detect the use of the time tag and use it to add an event to the user’s calendar. The Firefox Operator add-on uses this tag, among others; you can read more about Operator on the Mozilla blog. If I wanted to be more exact, I could say that I’m writing this blog post at<time datetime=”2010-7-12T16:08-07:00>Monday afternoon</time>. This gives the exact date, time, and timezone – in this case, UTC-7, Mountain Time.