Rotating Text Banners: The HTML Container - Doc JavaScript
The HTML Container
It's time to create the data insertion point in the document. We need to define the exact position of our banner, so we'll use a <SPAN>...</SPAN>
definition.
Navigator 4.0x can only write HTML code to a positioned element (position: absolute
) so our element must be positioned. However, since we want to place it in the document's flow, we won't specify any positioning properties (left
and top
):
<SPAN ID="banner" STYLE="position: absolute;"></SPAN>
If you want to specify the banner's exact coordinates in relation to the browser window, simply install the left
and top
properties:
<SPAN ID="banner" STYLE="position: absolute; left: 100; -->
top: 300;"></SPAN>
We promised to create a backward-compatible script. If you want older browsers to display the banner's first frame, put the desired text (or any code) in the <SPAN>...</SPAN>
definition. If you don't want a static banner on older browsers, you should keep the <SPAN>...</SPAN>
definition empty.
Regardless of how you decide to include the element in the document, it should be followed by two <BR>
tags. Since it is a positioned element (despite the fact that it has no explicit left
and top
definitions), content placed after the banner does not account for its space. Therefore, two <BR>
tags are required.
Created: September 25, 1997
Revised: April 16, 1998
URL: https://www.webreference.com/js/column3/styles.html