HTML
  Home arrow HTML arrow Building a 3D HTML Table
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

Building a 3D HTML Table
By: Chrysanthus Forcha
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 7
    2008-11-11

    Table of Contents:
  • Building a 3D HTML Table
  • Demonstration
  • Open the File
  • Explanation of the Code

  • 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


    Building a 3D HTML Table


    (Page 1 of 4 )

    In this article, the first one in a four-part series, I show you how you can create a three-dimensional HTML table. I assume you have basic knowledge of HTML, DOM and JavaScript.

    Description

    The HTML table as defined in the HTML specification is a two-dimensional object. In other words, the specification does not define a 3D table. The 2D table defined works like this:


    Cell, Cell, Cell, Cell, Cell

    Cell, Cell, Cell, Cell, Cell

    Cell, Cell, Cell, Cell, Cell

    Cell, Cell, Cell, Cell, Cell

    Cell, Cell, Cell, Cell, Cell

    Cell, Cell, Cell, Cell, Cell


    There are several ways you can create a 3D HTML table. I will show you the way I find most convenient. 

    Now, you can decide to have only one HTML element and no text, as content for each of the above cells. That is:

    Table, Table, Table, Table, Table

    Table, Table, Table, Table, Table

    Table, Table, Table, Table, Table

    Table, Table, Table, Table, Table

    Table, Table, Table, Table, Table

    Table, Table, Table, Table, Table


    Now, let us allow only one row for each of the tables above. That is


    Row, Row, Row, Row, Row

    Row, Row, Row, Row, Row

    Row, Row, Row, Row, Row

    Row, Row, Row, Row, Row

    Row, Row, Row, Row, Row

    Row, Row, Row, Row, Row


    These rows are going into the page, forming the third dimension.

    In the above illustrations (grids), there are six rows and five columns in what you are seeing.

    So my 3D table is the normal 2D table where the content of each table cell is a one-row table. The 3D table consists of cells arranged in a 3D grid. It is the cells of the one-row tables that can take arbitrary content; each cell in the 2D table has only one item for its content, the one-row table.

    Irregular 3D Table

    The rows in the one-row tables can be of different lengths. If that is the case, the back of the 3D table will be irregular, so the 3D table as a whole will also be irregular.

    Regular 3D Table

    If the rows of the one-row tables are of the same length, then the back of the 3D table will be flat. In that case you will have a cuboid, a regular 3D table. For the rest of the article, I will talk about 3D tables that are cuboids. The size (number of cells) of such a table is given by

    Y x X x Z

    where Y is the number of rows in the 2D table, X is the number of columns in the 2D table and Z is the number of cells in each row in the one-row tables.

    The Planes

    The cells can be considered to be at the intersection points of the vertical and horizontal planes. The vertical planes I am referring to are the planes as seen from the front, placed one behind the other into the page.

    Seeing Only One Plane at a Time

    Even though we have a 3D table, we have but a 2D screen. Only the contents of one vertical plane should be seen at a time. For the contents of the planes whose cells are not seen, the cells are each given the value of "none" for the CSS display property. For the contents of the planes whose cells are seen, the cells are each given the value of "block" for the CSS display property.

    Index Identifiers

    There are no official identifiers for the indices (corresponding to Y, X, Z). I use i to identify any row in the 2D table, j to identify any column in the 2D table and k to identify any index of a cell in a one-row table.

    IDs

    The one-row tables must have IDs. The other elements in the 3D table do not need to have IDs. However, I have given IDs to all the elements in the example in this article. The IDs follow the order of the index identifiers (i, j, k) that I explained above.

    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 2 Hosted by Hostway
    Stay green...Green IT