spacer

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

home / experts / javascript / column3


The HTML Container

Developer News
News Flash: Adobe Has iPhone Workaround
Adobe's Flash 10.1 Goes Mobile (Minus iPhone)
A Salute to Visionary CEOs

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

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs

webref The latest from WebReference.com Browse >
Building a Banking Application Home Page with OOP · Mixing Scripting Languages · Review: phpFox, a Social Networking CMS with all the Bells and Whistles
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Enterprise 2.0: Social Networking in the Cloud · BroadSoft Marketplace Hastens Pace of Telephony Innovation · Review: HTC Hero for Sprint


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

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