Advertisement

Tavis-J-hampton

Firefox and Chrome Tools for Web Designers

Firefox and Chrome Tools for Web Designers

Firefox and Chrome

Mozilla Firefox and Google Chrome are both very attractive web browsers for technology specialists and web designers. This popularity is due to the browsers’ free and open source distribution, their unique features, and their extensibility.

It is the extensibility, in particular, that wins the browsers points for web designers. With the right extensions, web designers can turn their browsers into web development applications, affording them with a wide range of design and analysis tools.

Online Tools for Web Designers

Online Tools for Web Designers

Web Designer Tools

As a busy web designer on the go, you need access to online tools and resources that can help you maintain a high level of quality and also make you more efficient. Whether you need photos, images, or just want to grind out some awesome code, there is a site on the web somewhere that can make your life easier.  Here are a few we have selected that you might find useful.

Template Design and Organization Tips

Template Design and Organization Tips

Template Design

Whether you’re making templates for WordPress, Joomla, Drupal, or any other type of content management system or dynamic web application, there are universal management and organizational best practices that will make each experience less painful and more rewarding. By keeping your template organized and following a systematic scheme (even one you design yourself), you will minimize the time you spend recreating a site from scratch and the amount of time you spend troubleshooting problems.

There is no magic to creating templates. Like regular web design, it requires attention to detail and methodical implementation of sound code. It is like building a house, piece by piece, and like building a house, it is much easier with blueprints, stages of development, and pre-manufactured standard components.

Add Dimensions to Websites with Modal Windows

Add Dimensions to Websites with Modal Windows

Modal Windows

If you are as old as I am, you probably remember when the World Wide Web, as we called it, was mostly just a bunch of hypertext pages. In other words, a website consisted of one page that linked to other pages, and if you were fortunate, the webmaster threw in a few scanned photos.

Fast forward to the 21st century, and we now have dynamic web applications that can do just about anything, even mimic an entire operating system.  While many developers are in the habit of using Adobe Flash or some other third-party software to create their web applications, you do not have to circumvent web standards to make your website interesting. A combination of HTML, CSS, and Javascript is really all you need.

One feature of the “Web 2.0” era that has literally popped up all over the web is the modal window. A modal window is essentially a window within a window. Rather than opening a new browser popup window, a modal window opens within the website and is completely dependent on it. Leave the website, and the modal window disappears.

Like most web functions, modal windows can be used for good and evil.  If you have visited Flickr.com recently, you might have noticed that they now have a modal window view option for their images, which is something many users probably enjoy. On the other hand, you have undoubtedly come across a site that pops up a modal window with an ad, survey, or other annoyance. They are immune to popup blockers, and some will stay with you even if you scroll down the page.

My hope is that this article will encourage you to use modal windows like Flickr and not like the latter example. They are convenient for things like internal login prompts, chat windows, and service notifications, all of which can appear without the user having to leave the page. Furthermore, modal windows can allow a user to run an entire operating system on a single web site, as is the case with EyeOS.

There are numerous ways to create modal windows and hundreds of variations in type, size, color, decoration, exit mechanism, and more. Today, we will cover a couple of different examples that you can use in your websites and customize to your liking. You can also download scripts that will create modal windows, as well as extensions for content management systems like Joomla, Drupal, and WordPress.

Modal Window Examples

Here are a few examples of modal windows.

Lightbox

The most common use of modal windows is for images, as I described in the Flickr example. To view an image in a modal window, the user clicks on a thumbnail of the image, and rather than opening the image on a new page or in a popup window, a modal window fills the web page, usually complete with a hover/shadow effect, a close button, and sometimes even a navigation to scroll to more images in the gallery.

Flickr still allows the user to view the image on a normal page, and this is the correct usage of modal windows.  It should not be the only method of viewing the image. The lightbox effect can also be used for embedded videos, an appealing alternative to having YouTube videos load directly on a web page, increasing wait time for visitors.

Login/Registration Forms

Have you ever found the exact page you wanted on a website, only to be told you must login to continue.  If you have an account already, it is no problem.  If not, you must click “register” and invariably be redirected to another page.  You may be redirected a few more times before you can try to find your way back.  Some sites will automatically take you back to the page you were on, but even that is not as convenient as a single modal window popping up to allow login or registration, and then disappearing, allowing you to continue on the same page.

By offering a modal login window to your users, you can save them time and avoid confusing redirects and lost or frustrated customers.

Notification System

The more advanced a web application is, the more there is a need to inform users of events as they occur.  Facebook, for example will alert a user when a new message or comment arrives.  If you have ever experienced an error on Facebook, you also have seen a modal window appear and present the error to you.  Rather than taking you off the page to display the error, you can close the little window and continue with something else on the page.

Contact Forms

Feedback on a website is very important, and contact forms are a necessity.  To avoid spam, most websites no longer display email addresses for contact, and even if they do, they usually still offer contact forms that can be used to direct users to formulate their questions in the most helpful way possible.

With a modal contact window, the form pops up and is easily accessible to the user, without forcing the user to another page.

Search Boxes

Websites come with a multitude of different types of search boxes.  Often times, just finding the search function on a website can be a challenge.  Then, you are presented with different styles, search methods, and destination pages, and that is just with a basic search.  Advanced searches can lead you further away from the main page of the site.

Modal windows can work for searching in many instances, but it has to be used for a purpose (like presenting options) rather than just a fancy gimmick or effect.

Help and Tooltips

A staple of operating systems for years, popup tips (not ads disguised as tips) are a useful way to give the user more information about a particular topic.  You can configure them to activate upon a user click or with a simple mouseover.

Now that you have all of these wonderful ideas for modal windows, you should give them a try.  Here are some helpful links to get you started.

Optimize Website Images for Performance

Optimize Website Images for Performance

Image Optimization

Part of the job of a web designer is to create a site that is both beautiful in its visual presentation and also fast in load times and downloads. This is sometimes a difficult balance to maintain. Large file sizes make for slower load times, so any bytes you can shave from your files (HTML, CSS, and Images) will reduce the wait time for your site’s visitors.

Making customers wait for a website to load is no different than a waiting room at a doctor’s office or a line at a grocery store. It is not completely avoidable, but you should make an effort to make the process as brief as possible.

Images, in particular, are the some of the biggest culprits for slow-loading sites.  While including some images as part of your site’s design often adds a needed asthetic appeal, piling on too many creates frustration for your site’s visitors, particularly those on slower Internet connections, slower computers, and mobile devices. Just because you created your website on a 3GHz, Quad-core machine with 4GB of RAM, does not mean Sally Netbook will have the same computing power.

There are three aspects of image optimization that you should evaluate when making your images ready for the web:

  1. File Format
  2. Resolution
  3. Bit Depth

1. File Format

The most common file format we deal with when snapping photos on our phones and downloading wallpapers is JPEG, but it is not the only format at your disposal.  JPEG uses compression, and that compression is inherently lossy.  The more you compress your JPEG file, the blurrier and lower quality it will become.  What makes JPEG appealing is that it can use dithering and smoothing to produce decent-quality photos with small file sizes.

At one time the GIF format was certainly one of the most widely-used image types for web design.  It compresses well, without losing quality.  What it does lose, however, is bit depth, which we will discuss later.  GIF is good for small images that do not require millions of color variations and depth (i.e. not for photos).  They also have support for brief animations.  You can use GIF compression to create very small image file sizes.

In the mid-1990s, the PNG format was introduced.  Like GIF, the compression was lossless, but it also added features like alpha channels (for variable transparency), gamma and color correction, and two-dimensional interlacing.  PNG can also compress files better than GIF in most cases.

At first, browser adoption for PNG (particular in Internet Explorer 6) was mediocre at best, particularly in terms of transparency support.  Later versions of all browsers support these features, and it should generally not be a problem.

PNG is great for higher-quality images, especially if you want to avoid quality loss, but beware of using them for photos, as the file size will be greatly increased in comparison to lossy JPEG files.  PNG can also compress and reduce bit depth, while still maintaining reasonable quality.  This makes PNG an acceptable replacement for GIF images.

2) Resolution

Image resolution is very important when dealing with computers of numerous shapes and sizes.  If you are in the business of sharing or selling photos, then multiple image resolution sizes are important, but the smallest sizes should be used first.

In other words, if the user is deciding which images to download, the first page he encounters should be thumbnails; small 75×75 pixel or 100×100 pixel images should be sufficient.  Clicking the thumbnails can open an intermediate-sized image in the 500×400 range.  A final click can then be used for the full sized image.  This will reduce the number of unnecessarily large downloads for photos the user may not actually want to see up close.

Photo by Victor Svensson

The other important point to remember about resolution is that image resizing must be down in the backend.  This means, either resize the images using an image editing program on your computer or use some type of web application to dynamically resize the images on the server, prior to sending them to the web browser.  But never upload a large image and then use HTML code to scale it.  When users visit a site with an 1200×1020 image scaled to 350×220, for example, their browser will still have to download the full size image.  If you reduce the size prior to uploading, however, they will download a much smaller file.

3) Bit Depth

Bit depth essentially refers to the number of colors an image uses.  1-bit is for monochrome pictures (i.e. black and white).  8-bit uses 256 colors16-bit uses 65,536 colors, and 24-bit images can have up to 16,777,216 colors.

Photo by wikimedia.org

For images other than photos, particularly those used to enhance your design in simplistic ways (i.e. rounded corners of a box or button backgrounds), use 8-bit PNG files.  Most image editing software, including Photoshop, has support for indexed PNG files.  You can also further compress the files with software that is specifically designed to create smaller PNGs, like pngnq.

Photo by wikimedia.org

Use Images Sparingly

One common mistake of inexperienced web designers is to use images when they are not actually necessary.  A divider with a solid color background and a shadow, for example, does not need to be an image.  Modern browsers support CSS techniques that will allow you to accomplish the same goal with minimal code and no images.  Future versions of HTML and CSS will support even more complex rendering to produce effects like gradients and SVG graphics and animations.

There are times when images are simply necessary, and you should save your bandwidth for those instances.  Once you have created a site, add up the bytes used by images on a single page.  Add that number to the HTML and CSS file sizes to see how much a user will have to download to access one page of your site.  Hopefully, the number will be small.

By carefully preparing the images you use on your website and using images sparingly, you can ensure that your site’s visitors will get the best experience possible.  When website visitors view a clean, fast-loading, accessible website, they are more likely to return and use the site again.  That is better for you, your clients, and your wallet.

Designing and Testing for Multiple Browsers

Designing and Testing for Multiple Browsers

Testing for Multiple Browsers

In the past decade, the web browser landscape has changed dramatically. At the end of the browser wars (Netscape vs Microsoft Internet Explorer), Microsoft was victorious, and Netscape seemed to lay floundering with no hope for recovery.

After Netscape’s quiet descent into the open source world, releasing Mozilla, and its eventual resurgence with Mozilla Firefox, developers who had become lazy, coding only for Internet Explorer (IE), were faced with a new dilemma.

Microsoft ending support for its IE version for Macs also helped to usher in a new browser from Apple: Safari. Add Opera and now Google Chrome, and the chance that coding for one browser and actually having your site look the way you intended on all the others, becomes very slim.

Browser market share aside, it is just part of web design best practices to make sure your website can reach as wide of an audience as possible. That means developing sites that work on desktop browsers, tablets, netbooks, screen readers, and mobile phones.

The easiest way to ensure cross-browser compatibility is to code according to W3C standards. Unfortunately, even that alone will not guarantee your site will be uniformly identical across all browser platforms. It will require testing, re-testing, and patience.

There are a number of issues to consider when designing for multiple browsers:

1. XHTML support -  At this time, most current browsers support all XHTML functions, but you may still need to check some.

2. CSS support – This is spotty, depending on the browsers.  There are some features Microsoft may choose to never support.

You will have to evaluate browser compatibility for CSS on a per-selector basis.  None of the browser makers implement support for a particular version of CSS across the board.  Instead, adoption is gradual, and more support is typically added with each release.

CSS2 is currently supported on IE8, IE9, Firefox 3.x, Safari 4 and 5, Google Chrome 4 and 5, and Opera 10.x.

IE8 does not come close to supporting CSS3, while the other above-mentioned browsers nearly support it but not perfectly.

For example, the box-shadow selector in CSS3 is supported by some but not others, and some of the browsers require specific indication that you are coding for them. IE 6, 7, and 8 do not support it at all, while IE9 is said to support it fully. Firefox 3.0 does not support it, while 3.5 and later supports it with the -moz- indicator. Similarly, Webkit-based browsers like Safari and Chrome support it with a -webkit- indicator. Opera supports it since version 10.53.

My point in mentioning this example is to show you that, while there are some great features available in the newer standards like CSS3, you will still have to use some old hacks to get true cross-browser compatibility.  For a box shadow, for example, you will have to rely on images, unless not having the shadow in some browsers will not affect the overall quality of the site.

3. Javascript – Here, the situation gets even more complicated.  Javascript engines for the various browsers are very different, and even if they support the same features, they may appear different.

Like CSS, you will have to test each browser independently to get an idea of what is supported and what is not.  You should also test for speed, as some javascript functions may be very slow in certain browsers.

4. Future features (i.e. HTML5) – All of the browsers still need improved support for future HTML features.  There is nothing wrong with coding for the future to make sure your sites will stand the test of time and still be compatible with browsers that do not have support.

If you do include any HTML5 functions in your website (like the video tag for iPad compatibility), you should also include an alternative, since most browsers will not be able to view whatever you insert.

5. Backwards compatibility – The sad truth is that some people still have old computers with old browsers like Internet Explorer 6.  You will probably not be able to make a site look perfect in newer browsers and IE6, but it does not hurt to make some effort to ensure your site at least still functions on antiquated technology.

To give an example of a feature that requires backwards compatibility, try testing PNG transparency in various browsers.  Most browsers have supported it for quite some time, but Microsoft did not support it in IE6.  This means that the background of a transparent PNG image will not display correctly in that old browser.  To fix that, there is javascript code you can add to mask the lack of PNG transparency support and fool IE6 into displaying it correctly.

How to Test

I have repeatedly stressed that you need to test browser compatibility, but actually being able to do that may not be easy.  If you have a Windows computer, you will be able to test all of the major browsers: IE, Firefox, Safari (albeit not in a truly Mac environment), Chrome, and Opera.  If, however, you are on a Mac, you will not have access to Internet Explorer.

There are a couple of options.  One is to use a virtual machine like Parallels, Vmware, or VirtualBox (free) and install Windows in it.  This will allow you to view IE performance in an actual Windows environment.

Another option is to use a compatibility site, a website that allows you to view how your website will look in multiple browsers.  Some popular ones include:

  1. Browser Shots
  2. CrossBrowserTesting.com
  3. BrowserCamp
  4. Adobe Browser Lab

In addition, you should also run HTML and CSS standards tests:

  1. validator.w3.org
  2. jigsaw.w3.org/css-validator

It may be more difficult to find testing sites that accurately display how your site will look on a mobile browser, but most are based on one of the major rendering engines like Webkit, Gecko, or Opera’s engine.  If you are truly unsure, you can try some of the mobile browser emulators available for download.

Finally, always make sure your site is accessible and can stand up to odd resolution changes (especially common with digital projectors), and other atypical displays.  Once you have all of that settled, you can actually begin working on content.

Unlock the Power of CSS List Menus

Unlock the Power of CSS List Menus

CSS List Menus

At one time, most websites had simple text links. Even an experienced web designer would, at best, organize some type of simple text list or table for their menu. If they wanted something more fancy (i.e. mouseover effects or image backgrounds) the only way to accomplish it was with an external plugin, such as Java. That often slowed websites to an unusable state.

CSS changed all of that, providing web designers with styling flexibility in lists, particularly when used to make menus. Without using Java, Flash, or even Javascript, you can have elegant looking menus that are fast and standards-compliant.

Getting Started

First we should define a few terms. A “list” in HTML lingo refers to the sets of tags used to list a number of items, either sequentially or not.  A sequential list is called an “ordered list” and is represented by the <ol> tag.  A non-sequential list is called an “unordered list” and is represented by the <ul> tag.  In web browsers, the default ordered list will have Arabic numbers and look like this:

  1. Roger
  2. Lila
  3. Cal
  4. Ming

An unordered list will use bullets by default and look like this:

  • Eggs
  • Cheese
  • Milk
  • Bread
  • Juice

The first step to creating a list menu is to make the actual list in your HTML file. Create a div container for the list, which will allow you to place it where you want on the page.  The <ul></ul> tags will surround each list item <li>:

<div>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="about.html">About Us</a></li>
<li><a href="store.html">Store</a></li>
<li><a href="contact.html">Contact Us</a></li>
<li><a href="links.html">Links</a></li>
</ul>
</div>

Next, add id’s to the list tags to identify them in your CSS file.

<div id="navcontainer">
<ul id="navlist">

For a basic navigation list, that is all you have to do to create it. If you want to manipulate backgrounds, colors, hover actions, and more, the rest of your work will take place in the CSS file.

CSS Settings

Find a good spot in your CSS file, or create a new one. Begin by adding the navcontainer id and assigning a width to it:

#navcontainer { width: 200px; }

The next step will be to specify the style and attributes of the unordered list as a whole:

#navcontainer ul
{
margin-left: 0;
padding-left: 0;
list-style-type: none;
font-family: Verdana, Arial, sans-serif;
}

Rather than displaying a style of bullet or numeric character, “list-style-type: none” will remove all list-item markers and leave only the words in the list.

The next items to configure are the list items themselves. In this case, you will style any list item in the container with an “a” link tag.

#navcontainer a
{
display: block;
padding: 3px;
width: 160px;
color: #fff;
background-color: #1A5101;
border-bottom: 1px solid #E9F1D9;
text-decoration: none;
}

The element “display: block” tells the list item to take up the full width allowed for it and to place a line break before and after each item. This will essentially make vertical buttons. The “text-decoration: none” removes the underline from the link.

Finally, specify the style of mouse-over for the buttons. In CSS the mouse-over effect is called “hover”, and an item’s style can be changed however you like, when the mouse pointer hovers over it. In this case, we will only change the background color and text color.

#navcontainer a:hover
{
background-color: #DEF1DE;
color: #1A5101;
}

That is all it takes to create a vertical menu using CSS. If you would like to try out your own versions, you can download the HTML and CSS files and customize them however you wish.

Horizontal Menus

With just a few lines of code, you were able to create a vertical menu with CSS.  You can use a similar process to create a horizontal one. The first thing you should know is that you do not have to change the HTML code at all. You can use the exact same HTML file and just change the tags in the CSS file to morph your list into a horizontal menu.

For the horizontal list, you will apply styles to the #navlist id rather than the #navcontainer. Changing the list from vertical to horizontal actually only requires one small tag change from “display: block” to “display: inline”.

#navcontainer {
padding: 0;
margin: 0;
text-align: center;
}

ul#navlist
{
background-color: #1A5101;
padding: 5px 0 5px 0;
white-space: nowrap;
font-family: Verdana, Arial, sans-serif;
}

#navlist li
{
list-style-type: none;
display: inline;
}

#navlist a
{
padding: 3px;
}

Notice the “white-space: nowrap” element, which prevents the list from wrapping at the end of the line when there is white space. Also notice that you can remove the “width” setting, but you are free to add a height setting, if you want to change the height of your menu.

Like the vertical menu, the next step is to specify the colors and behavior of the links and mouse hover effect.

#navlist a:link, #navlist a:visited
{
margin: 0 3px 0 3px;
padding: 1px;
color: #fff;
border: 1px solid #fff;
text-decoration: none;
}

#navlist a:hover
{
background-color: #DEF1DE;
color: #1A5101;
}

With just those CSS tags, your vertical menu will now be a horizontal menu. You can view the HTML and CSS file for the horizontal menu and customize it to your liking.

Background Images

If you have a particularly fancy website, you may find simple solid background colors for your buttons to be too plain. With CSS you can create background button images for normal and hovered states, without using javascript or any other additional code. We will use the first vertical menu example as our template and only change a few settings.

First, create images, and make sure they are the exact size of the buttons you want to display on your page. Create one button  image for the normal state, save it, and then alter that image (i.e. make it lighter, darker, or a different color) and save it under a different name for the hovered state.

In the “navcontainer a” tag, you need to add a “background-image” element that will take the place of the background color:

#navcontainer a
{
display: block;
padding: 3px;
width: 160px;
color: #fff;
background-image: url(images/normal.png);
background-color: #1A5101;
border-bottom: 1px solid #E9F1D9;
text-decoration: none;
}

Next, edit the “navcontainer a:hover” tag to use the hovered state image:

#navcontainer a:hover
{
background-image: url(images/hover.png);
background-color: #DEF1DE;
color: #1A5101;
}

Now, each button will have a background image that may look like any type of button you want, depending on your graphic design, and will also seamlessly change to another image when hovered.  Be sure to keep the image file size small so that there is no delay when users hover their mouses over the buttons.

There are a multitude of other styles and techniques for making CSS list menus.  Experiment, find new ways to beautify your websites, and share your discoveries.

An Introduction to HTML5 Tags

An Introduction to HTML5 Tags

HTML5 Tags

As a web designer, it is important for you to keep up on the latest technology available to you. Although full adoption of HTML5 is probably still a few years away, learning how to create some HTML5 tags on your websites will put you ahead of the rest. Furthermore, some tags (the video tag in particular) have already been adopted by certain platforms (think iPhone and iPad). You can ultimately decide if you want to cater to those platforms or not, but being aware of them certainly cannot hurt.