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 ...
Get Pure JavaScript now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.