Home arrow HTML arrow Finishing Touches for a Common Browser Menu
HTML

Finishing Touches for a Common Browser Menu


There are two states of a sub menu item generally. In the code we have been talking about so far, when a menu item appears, it is brown; when the mouse pointer goes over it, it is firebrick. This is done by changing the background color of the table cell of the sub menu item. In this part of the series I show you how you can use two images instead of two background colors to indicate these two states of a sub menu item. This is the final part of a ten-part series on building a common menu browser.

Author Info:
By: Chrysanthus Forcha
Rating: 5 stars5 stars5 stars5 stars5 stars / 1
May 08, 2009
TABLE OF CONTENTS:
  1. · Finishing Touches for a Common Browser Menu
  2. · Modifying the code
  3. · Making the code work with other browsers
  4. · The nuance explained
  5. · Advantages and disadvantages of this simple layout

print this article
SEARCH DEVARTICLES

Finishing Touches for a Common Browser Menu
(Page 1 of 5 )

The code in this series works very well with Internet Explorer, Mozilla Firefox and Netscape. The majority of users worldwide use one of these three browsers. Even though the aim of this series is to come up with a menu that can work with as many browsers as possible, as an extra touch I'm going to show you how you can add code so that it would work with other browsers as well. 

Using Images for Cell Background

In this section we shall see how to use an image as background for a table cell of a sub menu item. This is how it goes: when a sub menu is displayed, you should see one particular background image in all of the cells. When the mouse pointer goes over a sub menu item you should see a different background image. When the mouse pointer moves away from the menu item, you see the initial (default) image.

We shall modify the previous code in order to fit these images into it.

The Images

Use your drawing tool and design two different images. Give each of them the dimensions of the table cells of the sub menus; all of these table cells have the same dimensions. In the code I will give you, the name of the image which appears with any sub menu item is normal.gif. When the mouse pointer goes over the item, the name of the image which then appears is over.gif. I will use these names to explain how you change the previous code to work with images.


blog comments powered by Disqus
HTML ARTICLES

- Does HTML5 Need a Main Element?
- Revisiting the HTML5 vs. Native Debate
- HTML5: Not for Phone Apps?
- HTML5 or Native?
- Job Hunting? Freelancer.com Lists This Quart...
- HTML5 in the News
- Report: HTML5 Mobile Performance Lags
- The Top HTML5 Audio Players
- Top HTML5 Video Tutorials
- HTML5: Reasons to Learn and Use It
- More of the Top Tutorials for HTML5 Forms
- MobileAppWizard Releases HTML5 App Builder
- HTML5 Boilerplate: Working with jQuery and M...
- HTML5 Boilerplate Introduction
- New API Platform for HTML5

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials