Home arrow HTML arrow Page 2 - Building an Image Gallery in a 3D HTML Table
HTML

Building an Image Gallery in a 3D HTML Table


This article aims to show you how you can use an HTML three-dimensional table as a picture gallery. The HTML specification does not specify a 3D HTML table. However, you can create one, as I've discussed in a previous article. You will also need basic knowledge of database tables, HTML, DOM and JavaScript. This article is the first part of a three-part series.

Author Info:
By: Chrysanthus Forcha
Rating: 5 stars5 stars5 stars5 stars5 stars / 4
February 02, 2009
TABLE OF CONTENTS:
  1. · Building an Image Gallery in a 3D HTML Table
  2. · 3D HTML Table: a Closer Look
  3. · The Table Code
  4. · Viewing the Next Plane

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
Building an Image Gallery in a 3D HTML Table - 3D HTML Table: a Closer Look
(Page 2 of 4 )

Planes

You can consider the cells to be in a 3D grid with horizontal and vertical planes. The vertical planes should be seen as 2D tables, one behind the other, going into the page. The counting of the planes begins from zero. The first plane is plane 0, the second is plane 1, the third is plane 2, and so on.

Indices

The counting of all indices begins from zero. I use the variable i to denote the index for a row in the normal 2D table; the variable j to denote the index for a column in the normal 2D table; and the variable k to denote the index for a vertical plane in the 3D table. This gives an index order of (i, j, k).

Seeing 3D Contents on a 2D Screen

We have a 3D table. How do you see the content of each cell on a 2D screen? The table has been arranged into vertical planes. You see the cell contents plane by plane, but not all the planes at once. All of the cells of the plane that are to be seen have the value of “block” for their CSS Display property. The rest of the cells in the other planes have the value of “none” for their CSS Display property. When an HTML element has a display property of “block,” it can be seen on screen. When an HTML element has a display property of “none,” it is not seen on screen and does not occupy space.

A Table Example

I will use a 3 X 3 X 3 table for the illustration. That is, there will be three rows and three columns in each plane, and there will be three planes. The cells of the first plane have the Display property value of “block” initially. This can be changed to “none,” while the value for another plane is changed to “block,” by JavaScript. The content of each cell is an image tag. All of the images can be different.

Operation from the User’s Point of View

There is an HTML button at the bottom of the 3D table. When you click the button, you see the contents of the next plane. When the last plane is reached, and you click the button, you will see the first plane. Clicking the button will repeat the process. The pictures in the planes are small in size. When you click a picture it enlarges itself. When you click the picture again, it goes back to its small size at its cell position in the plane.

In the next part of the series I will show you how you can scan the plane automatically while keeping the ability to maximize and restore the images.


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