HTML
  Home arrow HTML arrow Page 2 - Background Images for a Menu for All Brows...
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
HTML

Background Images for a Menu for All Browsers
By: Chrysanthus Forcha
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 1
    2009-06-17

    Table of Contents:
  • Background Images for a Menu for All Browsers
  • Using Background Images
  • Changes to the Code
  • Review of the Project

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Background Images for a Menu for All Browsers - Using Background Images


    (Page 2 of 4 )

    In this series, you can use the table (cell) borders as your menu item borders. This was difficult to accomplish in the previous series, considering our objective that the code should work with browsers without particular code segments addressing particular browsers. If you want borders in the previous series, you can use images that have intrinsic borders. If you do not want the table borders, then set the value of the of the border attributes of all the tables to zero. That is:

    border = “0”

    In this example, here, I allow the border, even though I use images.

    We can use images as our cell background. What we need are two images: one when the menu item is displayed ordinarily, and the other when the mouse pointer is over the cell. Since we have cells of different widths, it may be difficult to have a pair of images that will cover these widths. Let us give up the desire to have images for the different widths.

    We still want images. We shall use narrow images. For either of the images, we shall choose an image that is vertically narrow. The height of the image should be such that the height extends throughout the height of the cell. The problem here is that different browsers may give different heights for the cell. So you have to avoid choosing a short image. An easy way to get the height is to estimate the height and test the image with the five browsers.

    For the code I will give you, there will be two images. The initial and default image that replaces the brown color has the file name "norm.gif." The image that replaces the firebrick color when the mouse pointer goes over a menu item has the file name "ov.gif." Each of these images is 10px thick and 20px high. I will show you how to make the images extend throughout the width of the different width cells.

    More HTML Articles
    More By Chrysanthus Forcha


     

    HTML ARTICLES

    - Comparing Browser Response to Active Client ...
    - Testing Browser Response to Active Client Pa...
    - Active Client Pages: Completing the Code for...
    - ACP and Browsers: Setting up an Example
    - How Browsers Respond to Active Client Pages
    - Completing a Tree with Active Client Pages
    - HTML Form Verification and ACP
    - Building an ACP Tree
    - Completing an ACP 3D HTML Table Image Gallery
    - Building an ACP 3D HTML Table Image Gallery
    - A Multiple Page Image Gallery with Active Cl...
    - Building an Image Gallery with Active Client...
    - Concluding a Menu for All Browsers
    - A Vertical Menu for All Browsers
    - Downloading Long HTML Pages with ACP







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 6 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek