HTML
  Home arrow HTML arrow HTML for a Common Browser Menu
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

HTML for a Common Browser Menu
By: Chrysanthus Forcha
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 1
    2009-03-13

    Table of Contents:
  • HTML for a Common Browser Menu
  • More on the Elements and Attributes
  • The Table Cell Contents in the DIV
  • The Style Sheet

  • 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


    HTML for a Common Browser Menu


    (Page 1 of 4 )

    In this part of the series I describe the HTML elements and their attributes. I do not talk about the events in this part; I will talk about the events in a later part. I will also talk about the CSS for the menu elements and sub menu elements. Throughout the series, we shall use the example that was described in the previous part.

    The HTML Elements and their Attributes

    The main menu is an HTML TABLE element. The table has one row with 10 table cells. Five cells are for the main links. Each link is in one of these five cells. Each of the other five cells is small. Each one follows a link cell and has a button. Each button corresponds to the preceding link. I will not talk about the onclick event now. This is the code for the one-row table:


    <table cellpadding="0" cellspacing="0" border="0">

    <tbody>

    <tr>

    <td class="link"><a href="mainlink0.htm">Main Link 0</a></td><td class="drop"><button type="button" class="drop" id="D0">v</button></td><td class="link"><a href="mainlink1.htm">Main Link 1</a></td><td class="drop"><button type="button" class="drop" id="D1">v</button></td><td class="link"><a href="mainlink2.htm">Main Link 2</a></td><td class="drop"><button type="button" class="drop" id="D2">v</button></td><td class="link"><a href="mainlink3.htm">Main Link 3</a></td><td class="drop"><button type="button" class="drop" id="D3">v</button></td><td class="link"><a href="mainlink4.htm">Main Link 4</a></td><td class="drop"><button type="button" class="drop" id="D4">v</button></td></tr>

    </tbody>

    </table>


    For simplicity I have given the table a cellpadding of zero, a cellspacing of zero and a border of zero. Each drop-down button has an ID. The ID begins with the letter D for Drop Down followed by a number. The numbers are from 0 to 4 according to their positions.

    All of the cells that have links are of the CSS class "link." Those that have the buttons are of the CSS class "drop." As you know, the CSS class is used to give the same style to all of the elements in the class (group).

    Let us now talk about the DIV element that holds the sub menus. This is the code for the DIV element without the cell contents:


    <div id="D1" style="position:absolute; width:900px; z-index:10; display:block; background:transparent; border-width:0px; padding:0px; margin:0px">

    <table cellpadding="0" cellspacing="0" border="0" id="TSM">

    <tbody>

    <tr><td class="sub"></td><td class="sub"></td><td class="sub"></td><td class="sub"></td><td class="sub"></td></tr>

    <tr><td class="sub"></td><td class="sub"></td><td class="sub"></td><td class="sub"></td><td class="sub"></td></tr>

    <tr><td class="sub"></td><td class="sub"></td><td class="sub"></td><td class="sub"></td><td class="sub"></td></tr>

    <tr><td class="sub"></td><td class="sub"></td><td class="sub"></td><td class="sub"></td><td class="sub"></td></tr>

    <tr><td class="sub"></td><td class="sub"></td><td class="sub"></td><td class="sub"></td><td class="sub"></td></tr>

    </tbody>

    </table>

    </div>


    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 5 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek