Interface Widgets: Advanced Buttons and Navigation Bar

Objectives

In this and the following articles of the Interface Widgets series you will learn about the largely overlooked and underestimated HTML button element (<button>) and how you utilize one to create great looking, easily manageable and usable User Interfaces.

In this iteration we will talk about the advantages of using button-based interfaces over the images-based. We will cover some of the advanced feature such as disabling buttons, skinning (styling) and displaying icons inside the buttons. While continuing on the subject in the next article we will build a complete web application/web site navigation bar.

HTML buttons:

 

 

$2.79
- OR -

Overview

Introduction

Building web site interfaces with all the navigation bars and menus has become incredibly easy nowadays. All you need is a modern graphic editor like Photoshop, or Fireworks, or Illustrator (even Photo-Paint from Corel would do). You design your interface using the editor tools, slice in pieces, assign roll-overs and export with all the graphics, HTML and JavaScript.  This is a great way to build web site navigation and probably is the best one when you’re working with a customer who will never visit his web site again (and who is getting it in the first place only because it’s hip).

On the other hand if you’re dealing with a client who needs to post frequent updates or building a custom design web application, things can get messy pretty quick. Every time you have to change something you need to modify your graphic file, export it again overwriting the existing files (which you may have already customized) and make the necessary adjustments.

Oh no, not again! You just got it all nice a pretty and now she wants to add more buttons or change the labels on the existing ones? This happens again in two weeks, then again in another week, then again and again.
Before you know it the file list in your images folder has gotten long as Rapunzel’s mane (with all the roll-overs and roll-unders  - you gotta have those!) and you are having a tough time locating an image you need to edit. Try to do a makeover or a new skin for an image-based interface – it’ll take you almost as long as creating a new interface from scratch.
But the worst case scenario is when you get a client who runs to you from a “bad” developer with no source files (the graphic file for the interface) and you have to clean up somebody’s mess.

You get the point, right? The solution is simple: build your navigation menus using the HTML <button> tag in conjunction with CSS and JavaScript. Using this approach you will keep all the advantages of the image-based interface, but you will also gain flexibility and some great features, especially when building web application which require high level of customization, ability to disable navigation components based on user permissions and skinning.

And now without further adieu the HTML <button> tag.

 

Alex July

Alex JulyAlex July is a Vancouver-based (Canada, British Columbia) Web Developer/ Graphic Artist who has an extensive experience in both creative realms.
He is also a host of Linecraft.com where he is showcasing his skills and sharing experience with the developers community. For the past 3 years Alex has been focusing on the development of Rich Internet Applications using Macromedia Flash technology.

When away from the computer Alex is practicing Martial Arts, playing guitar and enjoying time with his wonderful family.

See All Postings From Alex July >>

Reviews

Be the first to write a review

You must me logged in to write a review.