|Do you have a lot of Ads and a tiny spot at your pages where you’d like to push them all?..
Are you forced to use a banner rotator or look for a similar solution? This tip is for you.
Show all your ads at the same time!
It’s not a script… It’s not even a trick…
<marquee>...</marquee> HTML-element creates a scrolling text marquee. This is all we need.
We’ll use 4 main parameters of the element:
* BEHAVIOR - sets how the text scrolls in the marquee,
* DIRECTION - sets the direction in which the text should scroll,
* SCROLLDELAY - sets the speed of the marquee scroll,
* SCROLLAMOUNT - sets the number of pixels the text scrolls between each subsequent drawing of the marquee.
||Default. Marquee scrolls in the direction specified by the
||Marquee scroll direction reverses when its content reaches the edge of the container.|
||Marquee scrolls in the direction specified by the
||Default. Marquee scrolls left.|
||Marquee scrolls right.|
||Marquee scrolls down.|
||Marquee scrolls up.|
|The parameter has a default value of 85.|
|The parameter has a default value of 6.|
Scroll your text Ads
You may have a continued text or several paragraphs with your ads scrolling up through a spot at your page.
Lets suppose you have a
<DIV> with specified
<DIV width="120" height="100"> <marquee BEHAVIOR="scroll" DIRECTION="up" SCROLLDELAY="60" SCROLLAMOUNT="1" style="width:120px;height:100px; border:1px solid silver;padding:4px;"> <b>Ad 1</b> <a href="url_1">link 1</a> Advertising text 1. <b>Ad 2</b> <a href="url_2">link 2</a> Advertising text 2. <b>Ad 3</b> <a href="url_3">link 3</a> Advertising text 3. </marquee> </DIV>
Rotate your banner images
Do you have banner images with equal sizes? Great!
You can rotate them without any script.
SCROLLAMOUNT parameter of your
marquee to your images
height and the
SCROLLDELAY parameter to
1000 for a second (1000 milisecinds).
Look at this:
<DIV width="60" height="62"> <marquee BEHAVIOR="scroll" DIRECTION="up" SCROLLDELAY="1000" SCROLLAMOUNT="62" style="width:60px;height:62px;"> <img width="60" height="62" src="url_1" /> <img width="60" height="62" src="url_2" /> <img width="60" height="62" src="url_3" /> ... </marquee> </DIV>
When you scroll ads with links it would be nice to stop scrolling to let the user clicks the link.
marquee allows you to do this too.
I promised there wouldn’t be a script… I were cunning
You’ll need a small script.
onmouseover attribute to trigger the
stop() method and the
onmouseout attribute to trigger the
start() method to scroll the text again after the user takes his mouse away.
This sample is for horizontal scroll.
<marquee BEHAVIOR="alternate" DIRECTION="left" SCROLLDELAY="100" SCROLLAMOUNT="5" onmouseover="this.stop()" onmouseout="this.start()"> <b>Touch this text with mouse to stop it</b> </marquee>