Home arrow HTML arrow Page 4 - Background Images for a Menu for All Browsers
HTML

Background Images for a Menu for All Browsers


In this seventh part of a nine-part series on building a menu that works in all browsers, we complete the discussion of the JavaScript functions. We go on to see how we can use background images for menu items instead of background colors. We shall start winding up the series at the end of this part.

Author Info:
By: Chrysanthus Forcha
Rating: 5 stars5 stars5 stars5 stars5 stars / 1
June 17, 2009
TABLE OF CONTENTS:
  1. · Background Images for a Menu for All Browsers
  2. · Using Background Images
  3. · Changes to the Code
  4. · Review of the Project

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
Background Images for a Menu for All Browsers - Review of the Project
(Page 4 of 4 )

The aim of this series is to come up with a menu code that can be used for all browsers, without any code segment specialized for a particular browser. We came up with one, but it could not work with all browsers. It satisfies most users, but not all. It works with Internet Explorer, Mozilla Firefox and Netscape. These browsers are used by the majority of users. That was achieved in the first series.

We have just come up with code which works with more browsers. It works with Internet Explorer, Mozilla Firefox, Netscape, Opera and Safari. The non-image code had the if-statement with bits for different browsers. This if-statement for the image code does not have these bits.

So the image code practically works with all browsers. Well, to be precise, it works with Internet Explorer, Mozilla Firefox, Netscape, Opera and Safari without any code segment really specialized for any of these browsers.

However, there is a small problem with Opera and Safari. With these two browsers, when you click on the BODY, outside the menu, the drop down and sub menus go off only if the mouse pointer fell on an element outside the menu. This is not a big deal, since a normal web page will have elements all over the BODY.

As you can see, we can say that we have achieved our aim. But a small bit is still left. We have not yet talked about a vertical main menu. We have talked about a horizontal main menu all along, but not a vertical main menu.

We have one more part in the series before the last part. In the next part, we shall see how to design a menu such that the main menu is vertical. It can be very difficult to do this using the technology of the previous series. It is easy to use the technology of this series to achieve this. A lot will still depend on the layout (arrangement) of the tables.

I hope you have appreciated everything so far. We'll rendezvous in the next part.


DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

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 8 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials