HTML
  Home arrow HTML arrow Page 4 - Table Attributes for a Menu for all Browse...
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

Table Attributes 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-05-27

    Table of Contents:
  • Table Attributes for a Menu for all Browsers
  • Attributes of the Drop Down Menu Tables
  • Attributes of the Second Drop Down Menu
  • Nesting Table Cell Attributes

  • 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


    Table Attributes for a Menu for all Browsers - Nesting Table Cell Attributes


    (Page 4 of 4 )

    Here is an illustration of one of the nesting tables and its nested table:




    Fig. 14.1

    This set of tables is displayed when the mouse pointer goes over the menu item named “Sub link 21 >” of the second drop down menu. The dash lines indicate the nesting table. The nesting table has three cells. The table for the sub menu proper is in the bottom-most cell.

    The cellpadding of the nesting table is zero. This means that the padding value for each of the three cells is zero, so the nested table just fits into the bottom-most cell. Well, the cellpadding and cellspacing of the nested table are each zero; the reason for this is for consistency with the other tables for sub menus.

    Now the presence of the border always adds to the size (width) of the table or cell. With the situation just described above, the width of the nesting table is smaller than the width of the nested table, since the nested table has a border.

    This can cause problems. In order to avoid any such problem, the cell padding value of the first two cells of the nesting table is 1px. This compensates for the border width of 1px for the nested table. The table tags for these two cells are:


    <tr><td width="175" style="padding:1px">&nbsp;</td></tr>

    <tr><td width="175" style="padding:1px">&nbsp;</td></tr>

    The table row elements (TR) are for the nesting table. Just note that each of these table cells has been given an effective width equal to the width of its table.

    Other Attributes

    Each cell of the main menu (horizontal bar) has an onmouseover event. We have already seen the use of this. Each cell for a drop down or sub menu has an onclick event and an onmouseover event. We shall see the reasons for this when we begin talking about the JavaScript code.

    Remark

    If you do not want a border for the menu items, then give the table cells a border width of 0px. In this case the rules attribute is not needed. From my experience, most users prefer to see some form of demarcations for menu items. The table (cells) border is the easiest way to achieve this (in this series).

    At this point it is a good idea to look at the layout and configurations of the tables of the code you downloaded in part ten of my earlier series on a common browser menu, before you continue. If you did not download the code in part ten of that series, then download it now from this link:

    versatileCommonMenu.ZIP

    We have finished with the layout and configuration of the tables. In the next part we shall begin the JavaScript code. The explanation will not be as long as the one for the previous series. Now we will take a break until 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.

     

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