HTML
  Home arrow HTML arrow Page 2 - Maximizing and Restoring HTML Images: Laye...
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

Maximizing and Restoring HTML Images: Layer Method
By: Chrysanthus Forcha
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 3
    2008-11-04

    Table of Contents:
  • Maximizing and Restoring HTML Images: Layer Method
  • The Method
  • Operation
  • Other Image Types

  • 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


    Maximizing and Restoring HTML Images: Layer Method - The Method


    (Page 2 of 4 )

    The image has the onclick event, which calls a JavaScript function. There is a global variable in the JavaScript, which indicates whether or not the image is maximized. The function uses this variable to change the dimensions and the layer of the image by changing the CSS properties. Layering simply means that one HTML element can appear in front of another, covering fully or partially the one behind it. However, many browsers do not handle layering the way it is specified by the W3C.

    Limitations and Behavior of Browsers concerning Layering

    Before I continue, let me tell you how browsers today handle layering as it concerns our project. There is a CSS property called “z-index.” The value of the z-index is an integer. An element with a higher z-index appears in front of an element with a lower z-index. Browsers today handle this property in this way, which is fine. 

    The CSS position property determines the left (Cartesian x) and top (Cartesian y) of an HTML element. The z-index property only works when you give the HTML element a CSS position property. Today’s browsers handle this feature in this way, which is fine. 

    Here is where browsers show their limitation and weaknesses. The position property can be as follows: “position:static,” “position:relative,” “position:absolute” and “position:fixed.” The value that interests us here is “absolute.” To save time I will not explain in detail the other three values. Know that browsers today handle the “static” and “relative” values as they should. Many browsers do not handle the “fixed” value; that is a limitation. With “position:relative,” the element appears relative to where it should appear in the normal flow.

    With the value “absolute,” the position of the element is supposed to occur with respect to the top-left position of the containing element (e.g. DIV element). However, browsers that I know display the element with respect to the top-left corner of the client area of the web page -- a weakness.

    If you give an element the CSS property “position:absolute,” and you do not give the element any CSS Left and Top property, the element will appear where (on the x,y coordinates) you placed it in the normal flow of the page. This is a behavior of browsers today that we shall exploit.

    Another weakness: when you do this, the position may not be exactly what you want. It may have a vertically downward displacement.

    More HTML Articles
    More By Chrysanthus Forcha


       · Thanks for stopping by to read my article. If you have any comments, questions, or...
       · Hi, This article I would like if it had become with Ajax. I mean that if I have many...
       · Officially Ajax would download text or XML information. Officially Ajax would not...
     

    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