Home arrow HTML arrow Page 3 - A Menu for All Browsers
HTML

A Menu for All Browsers


The aim of this series is to come up with code that can be used by all browsers without having code segments addressing the peculiarities of different browsers. I accomplished this in part in a previous series, but I needed to use extra code segments, and there were still some problems. This nine-part series addresses those problems while accommodating more browsers.

Author Info:
By: Chrysanthus Forcha
Rating: 3 stars3 stars3 stars3 stars3 stars / 2
May 06, 2009
TABLE OF CONTENTS:
  1. · A Menu for All Browsers
  2. · Tutorial arrangement of this series
  3. · The secret of the elaborated layout approach
  4. · Overall layout
  5. · The Main Menu

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
A Menu for All Browsers - The secret of the elaborated layout approach
(Page 3 of 5 )

If you have some patience, then the code (or your own) here will work with all browsers. The secret of the code in this series lies in the use of HTML tables and the layout of the tables. When an HTML table is simple, any modern browser can handle it.

If you have been in the field of web designing for the past 10 years, then you would have heard that you should avoid using tables when it comes to layout. You will be surprised at the way the browsers will handle the HTML tables here; the reason is that the tables are simple and straightforward. When any table becomes complicated in design, browsers today find it difficult to handle.

A sub menu (including a drop down menu) is simple in its presentation. It is of a grid-like (one column) nature; so a simple HTML table can be used for it. In this series, each sub menu, no matter its level, is an HTML table. For the sub menus, you have one main table, with tables inside it. These tables inside are the sub menus. When you want to see a sub menu, you change the value of its display property to "block;" when you do not want to see it, you change this value to "none." This is how the design in this series is different from that of the previous series..

The links are no longer in SPAN elements. Each cell has a link. This greatly simplifies our code.

HTML tables are used as sub menus. Each cell and its link is used as a menu item. In this way we can easily give borders to menu items by giving borders to tables (cells). In the previous series, the problem of giving borders to menu items arises when you have a sub menu taking up some cells at the bottom. It is difficult to give these cells borders without the cells above them in the same column having borders.

This problem is solved in this series by making such sub menus an HTML table (inside the HTML table you expected). You then give all the cells in this table a border, as we shall see.

A lot of the design work here lies in the layout of the tables (and their configurations).


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