Download Fixed marquee script

Demo

Put this into your <HEAD> section

Put this into your <BODY> section

Configuration

You use plain HTML when you define the content of the marquee.
<div id="dhtmlgoodies_marquee"> is used to define the marquee object, and you use one inner div for each of your news messages. Example:
<div class="textObj">
<span class="highlighted">Breaking news!</span>
This is the content of my marquee.
</div>

CSS in the <HEAD> section is used for the layout of the marquee. Look at the comments there for more information.

You could choose between showing the marquee at the top or at the bottom of your window. This is defined in a javascript variable:
var dhtmlgoodies_marqueePosition = 'bottom'; // "top" or "bottom"

The speed is also something you could change. Two variables are used for this:
var dhtmlgoodies_marqueeSteps = 2; // Higher = Faster, Lower = slower and more smoothly
var dhtmlgoodies_marqueeSpeed = 8; // Lower value = Faster

Comments

miguel perez
I want to add a picture to the left of the scroll and change the textplease help methanks
miguel perez at 02:43AM, 2011/05/16.
andi
nice tutorial, greats :D
andi at 12:30PM, 2011/05/22.
cookiegal
when i put var dhtmlgoodies_marqueePosition = 'top'; // "top" or "bottom" it doesnt work in my IE 8, why?
cookiegal at 02:36AM, 2011/09/02.
asad
nice!!!!!!!!!!
:)
asad at 05:43AM, 2011/10/06.
Oladokun Stephen
Thanks so much for this ... i really appreciate it. God bless and more grace
Oladokun Stephen at 12:02AM, 2011/11/23.
clark
Yea I have problem with ie8 any hints?
clark at 04:06PM, 2011/12/12.
chevronne
<a href="#comment471">miguel perez wrote:</a>I want to add a picture to the left of the scroll and change the textplease help methanks
chevronne at 12:13PM, 2012/02/21.
Bradley Corner
Is there a way to set a background image? I set up a a tag in my site.css of #mycrawler { background-image: url(../Images/red-background.png); background-repeat: no-repeat;}and it shows up in preview mode (dreamwweaver) but when I go live it disappears and the background color shows through.
Bradley Corner at 02:01PM, 2012/03/20.
Tirah
Hello...Great script btw. Changed highlight colors & text...works like a charm, BUT it shifted my entire front page content to align:left. How can I align my page back to center without removing script? Please help asap! Thx
Tirah at 08:29PM, 2012/04/20.
banana
Great tutorial. Thank YOU guys;D
banana at 10:34AM, 2012/05/09.
abrahim
how I change text right to left
abrahim at 04:02PM, 2012/12/30.
JWHAR
how I change text moving from left to right
JWHAR at 10:17AM, 2013/07/01.
salar
nice...Thank you
salar at 03:38PM, 2013/07/31.
Thor Sølyst Farup
Hello how to i change it so the next "breaking news" comes before the other has disappeared. So there is just a little bit of space between them?
Thor Sølyst Farup at 10:57AM, 2014/09/17.
santosh
Hi,how can i display a marquee tag like a block.means news display in channels in abox..........
santosh at 06:31AM, 2014/12/15.

Post your comment

Don't have an avatar? Create one at Gravatar.com.

Confirmation code:

Go to cbolson.com


About/Contact | A good idea? | Submit a script | Privacy notice
© 2005 - 2017 dhtmlgoodies.com