spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / experts / javascript / column3


The HTML Container

Developer News
OpenOffice 3.2 Lands Amid Critical Changes
Red Hat, IBM Firmly in KVM Virtualization Camp
Red Hat Talks Up Open Source Cloud Plans

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.

http://www.internet.com


The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers

webref The latest from WebReference.com Browse >
Search Engine Optimization: Selecting and Embedding Keywords · Are Google's Language Translation Web Services Ready for Prime Time? · Installing and Using Meeplace, the Business Review CMS
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
IBM DB2 10 for z/OS: Justifying the Upgrade · Living La Vida Colo: Choosing the Right Colocation Facility · FTC Concerns over Social Media Privacy Linger


Created: September 25, 1997
Revised: April 16, 1998

URL: http://www.webreference.com/js/column3/styles.html