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:  stars stars stars stars stars / 0
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

TOOLS YOU CAN USE

advertisement
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

- HTML5 Boilerplate: Working with jQuery and M...
- HTML5 Boilerplate Introduction
- New API Platform for HTML5
- BBC Adopts HTML 5, Mozilla Addresses Issues
- Advanced Sticky Footers in HTML and CSS
- HTML and CSS Sticky Footers
- Strategy Analytics Predicts HTML5 Phones to ...
- HTML5 Guidelines for Web Developers
- Learning HTML5 Game Programming
- More Engaging CSS3 and HTML Background Effec...
- Engaging HTML and CSS3 Background Effects
- More Web Columns with CSS3 and HTML
- Columns with CSS3 and HTML
- Creating Inline-Block HTML Elements with CSS
- Drag and Drop in HTML5: Parsing Local Files

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



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