Victor Juri

Best Practices for Web Design in a Multi-browser Multi-platform Digital Universe.

In an earlier post (See White Elephants on the Web), James Maconochie asked the important question of whether it was time to dust off that old website and make it more consistent with today’s technologies and the needs of today’s consumers. If you agree that your current web presence might be a bit outdated and ready for a polishing – Read on. What follows are some important items for consideration as you begin to develop a strategy to develop Yoursite X.0

 

HTML Development:

 

The Progressive Enhancements Approach
Create your html so it is compatible with the lowest common denominator then enhance that version with more advanced HTML 5 and JavaScript features. This way, you aim to provide any browser with the best possible combination of features supported in it. It’s never going to be perfect by the way so bear in mind the 80/20 rule to avoid running the project into the ground.
 
Graceful Degradation Approach
This is the opposite of the above and should be used when the functionality is the more complex. When you have a page that requires advanced features, you create the advanced features first in a supported browser and then apply patches or fixes to make sure that the older browsers display and function correctly. Using browser specific styles sheets is a common fix applied here. For example if you are building an interactive image gallery you may build the gallery for one browser them make sure it works and displays well on all the others adjusting code along the way.
 

Laying Out for Multiple Devices

 

In today’s web we no longer just design for the desktop but for a variety of screen sizes from TV, Desktop, tablet to Mobile devices. So how do we deal with the variety of screen sizes and resolutions? 
 
Enter responsive design.  The de facto standard has been to design desktop web pages with widths of 960px. This is the standard size of the iPad and many other tablets. Responsive design takes multi device support to a new level by detecting the size of the screen viewing the page and applying different layout and styles as to create an interface that is easier to interact with and read. 
 
CSS3 media queries are a great way to achieve this. It is recommended that when creating designs for multiple screens each device type have a design created for them if possible. So in an ideal world you would have a design for TV, desktop, tablet and mobile phone. However, we know that budgets and time constraints can limit our ability to do this. So when you only have the time and/or budget for one design create a 960px width design with a viewport meta tag. This is a tag on an html page that tells the browser how to scale the content for smaller screens.
 
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
 
Another approach could be to design a page with a percentage layout which adjusts to screen sizes. However, making this type of design look good on all screens & resolutions is challenging. The reason percentage based design is difficult is because you have to account for the changing size of all elements on the page as the screen size shrinks or expands. When pages have multiple text areas, images, tables, etc… the number of combinations to account for quickly becomes unmanageable. Add the way different browsers treat the layout of these elements and you have a tangled mess that is very hard to perfectly layout for all sizes & browsers. Having a stable container allows predictable behavior cross browsers and provides better looking layout across resolutions and browsers. What usually happens with complex percentage layouts is that the design looks poorly on all screens and you spend valuable resources and time trying to get it to look good across a myriad of screens and browsers. It’s better to have an exact width design that scales with the viewport meta tag.
Responsive Design makes Sites work on Multiple Devices
 
Scaling
Most assets on a web page are text, html elements, images or media. To successfully implement a responsive design, these assets need to be able to scale in size across interfaces and devices. Scaling fonts for each of the designs is best achieved by using CSS, overriding the standard style with CSS media query styles. Scaling non-text assets is more complex. CSS can adjust the size of html assets but media and images require server side code to dynamically scale them to ensure  efficient bandwidth use and easy cross-device scaling of assets. The idea is to construct a service so you can call an image like this: 
 
<img src="/script/timthumb.php?src=/some/path/myimage.png&w=100&h=80" alt="resized image" />
 
Web Form Design
When constructing forms you should create watermarks (Example) to indicate what the name of the field is instead of creating a tag next to the field indicating what the field is, this saves the screen real estate used by having to write the field name above or below it. Field validation is very important as it assist the user in entering field information correctly. Be sure to use JavaScript and server side validation for each field. It is also recommended to use the max length attribute for any text boxes.  For more information on web form design, check out Luke Wroblewski ‘s website and book.
Use Watermarks in your Web Forms
 
Use Modal Dialogs
Modal dialogs help create focus and clear indication as to what the user should do next. Modal dialogs help remove any distraction so the use can perform an action efficiently, like registration or viewing an image. This is a more elegant usability style than – say – having an empty page with a small form in it.
Modal Dialogs focus users on the appropriate next action
 

Conclusions

  • Design for the lowest common denominator first, then add features as needed unless you are using advanced features then design for the feature first then fix each browser or screen to ensure compatibility. 
  • Designs with fixed widths are much easier to create, support and make compatible across browsers and devices. Use a 960px width with a viewport tag as a minimum for cross-device support. 
  • Use CSS media queries to create different designs for each screen size when budget and time allow. 
  • Use image and media scaling server side code to ensure you are dynamically scaling your images to efficiently utilize bandwidth.
  • Validate forms with JavaScript form validation and error messaging and use form watermarks to save vital interface real estate. 
  • Use modal dialogs to focus the user’s attention on accomplishing desired tasks.
In short be sure to design with the user in mind make it convenient for them regardless of the device they use, this will help you achieve a pleasant  and profitable web experiences.
 

 

Download our eBook on Mobile App Strategies for Sales Enablement