floating image with text script
 

SimplytheBest
Scripts

ASP scripts
PERL scripts
PHP scripts
JavaScripts & Ajax
Snippets
Online scripts

Ajax, DHTML
& JavaScripts

Animation
Background
Bookmarks
Buttons
Calculators
Cookies
Data handling
E-mail
Enhancements
Forms
Image rotation
Menus
Messages
Miscellaneous
Music
Password protection
Redirection
Scrollers
Tables
Time & date
Windows

Publishers
Add script
Account login
Publisher list



 

Home > Scripts > DHTML scripts & JavaScripts > Enhancements > Floating image/text

 

Floating image/text script

AUTHOR: Submitted by John J.
TYPE: Freeware
BROWSERS: IE 4+, IE 5+, IE 6+, NS 4+

A script that makes an image with or without text float in a defined vertical position while scrolling up and down.


EXAMPLE

Scroll vertically and you'll see the image with text floating at the left side of this page.


1) Download this ZIP file
with the float.js script file and unzip into the appropriate directory.

2) Insert this HTML code anywhere inside the <BODY> section of the page.

then copy (CTRL-C) & paste (CTRL-V)

3) Define the top and the left position of the image/text on the page in this section of the .js script file:

// modify top position
var IMGH= 10;

// modify left position
us.style.left = 6;

4) Define the path to the script file in the <BODY> section:

<SCRIPT src="script_files/float.js"></SCRIPT>


[BACK] [TOP]

 


Copyright © 1997-2009 SimplytheBest Inc. Terms of Use and Legal Disclaimer.
All copyrights are acknowledged. All rights reserved.