• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 5. Forms, Cookies, Windows, and ... > Dynamic HTML Element Positioning

Dynamic HTML Element Positioning

Dynamically positioning HTML elements within a Web page using JavaScript allows developers to take Web page design to a new level. No longer is an HTML element forced to stay in the same place for the duration a Web page is viewed in a browser. Now elements can be moved all around the browser window after the page has completed loading. Elements can even exhibit three-dimensional movement where one element can appear in front of, or behind another element. Before you get too excited thinking about how you can change your existing Web pages to having flying buttons and disappearing text, there is one problem—browser compatibility.

Netscape initially tackled three-dimensional positioning with the <layer> tag in Netscape Navigator 4. Internet Explorer implemented three-dimensional positioning by extending the functionality of the existing HTML <div> tag, which had previously been of little use to most Web developers. So, you are probably thinking that the <div> is supported by Netscape. While it is true that both Netscape and Internet Explorer use the <div> tag to define static "layers" in their browsers, only Internet Explorer supports using it for dynamic positioning.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint