HTML
  Home arrow HTML arrow Page 4 - Mimic Edge for HTML Magic Edges
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

Mimic Edge for HTML Magic Edges
By: Chrysanthus Forcha
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 1
    2009-03-16

    Table of Contents:
  • Mimic Edge for HTML Magic Edges
  • Scrolling from the web page edge
  • Basic Implementation of Magic Edge
  • Scrolling from the Left Edge

  • 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


    Mimic Edge for HTML Magic Edges - Scrolling from the Left Edge


    (Page 4 of 4 )

    The BODY element has zero padding and zero margin. The corresponding CSS statement for this is:


    body {background-color:#ff9933;padding:0px; margin:0px}


    The mimic edge element is:


    <div id="DL" onmouseover="doShiftRight()" style="width:1px; height:50px; background-color:#ff9933; border-width:0px; padding:0px; margin:0px; display:inline">

    </div>

    It has a width of 1px. It has an initial height of 50px. The actual height will be given by a function from the BODY onload event. It is advisable to give the initial height or initial width in the attribute of the element, rather than in a CSS statement in style sheet. The background color is that of the BODY element.

    There is an onmouseover attribute. When the mouse is over the mimic edge, the  doShiftRight() function will be called. The value of the display property is "inline." This allows other elements to go on its right. The doShiftRight() function will shift the inner DIV element to the right. The script will no longer be in the BODY element; it will be in the HEAD element.

    The outer DIV element should not have a border. Erase the following property from the CSS statement of the outer DIV element.


    border:2px solid blue;


    Replace what you have erased with:


    border-width:0px;


    The two DIV elements (inner and outer) are the elements next to the mimic edge. Remember that a DIV element has an inherent <br /> element before and after it. So the outer DIV element has to take an "inline" value for its display property. Add the following property to the CSS statement for the outer DIV element.


    display:inline


    Make sure the properties in any CSS statement are separated by semicolons. There is still a problem with our basic work. The "inline" value for the mimic edge implies that every space on its right is taken up by one line. So the DIV (calculator) will appear low on the line and therefore at the bottom of our present page. In order to make it appear higher up, we have to give it the CSS property “vertical-align:top.” Add the following property to the CSS statement for the outer DIV element. Make sure all properties are separated by semicolons:


    vertical-align:top


    The onload event for the BODY attribute is:


    onload="giveHeight()"


    When the web page is loaded, the following function is called:


    function giveHeight()

    {

    document.getElementById('DL').style.height = screen.availHeight;

    }


    This function gives the screen height to the mimic edge.

    Let us take a break here. In the next part of the series we shall continue with the shifting function.


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