Return to Main Menudzigns by ShivSpacer
 
Explanation

Blinking Text


The latest specification of CSS2 properties includes a nice little "text-decoration" called BLINK. Unfortunately, there is no clean way to use this bit of rather attractive property such that it would work on both Netscape 4+ as well as IE 4+ versions. Luckily, it is supported by Netscape Browsers (I think, release 4.08 onwards). But then what happens to IEs?

To accommodate IE users, I have used a small bit of DHTML. Nothing fancy, very simple & explained many time over else where in this site. Besides, I'm sure, most of you know it any way!

This would be useful, if you want your visitors to pay particular attention to a certain section of your page, may be? Removes the necessity of using heavy duty graphics. The script itself is no more than a few hundred bytes! DEFINITELY less than a 'Kb'.

There just two other variables that you can change, if you wish.

All that I've done is looped in Show & Hide functions, each with 1 second TimeOut (1000 milli-seconds, change it if you wish). These functions are called upon on IE4+ browsers. Netscapes, simply use the STYLE SHEET property.

The script

Paste this section within the HEAD tags

<script language="javascript">
<!-- hide from old browsers
// Written & created by Shivaji Basu
// Copyright www.shivbasu.com
// Use this script at your own risk
// To use his script, you MUST leave this disclaimer & credit as it is

ie4 = (document.all)? true:false

function showit() {
if (ie4) {blinking.style.visibility = "visible"}
setTimeout("hideit()",1000)
}

function hideit() {
if (ie4) {blinking.style.visibility = "hidden"}
setTimeout("showit()",1000)
}

//-->
</script>

<!--This is the Style specification - feel free to change the font specs. -->

<style type="text/css">
<!--
#blinking{text-decoration:blink;font-family:tahoma,verdana,font-size:12px;color:#400000;
}
-->
</style>

Paste this part within the OPENING Body tag for Auto execute

<BODY onload="showit()" background="" bgcolor="" .....>
// Fill in the Background Image URL, BG color etc as normal

Paste this in the main Body

<DIV id="blinking">YOUR TEXT GOES HERE</DIV>'



Copyright DBS © 1998-2003. All Rights Reserved