View Full Version : How do you change the LINK color in the Cross Browser marquee script? HELP!

10-29-2006, 06:35 AM
1) Cross Browser marquee script

2) http://www.dynamicdrive.com/dynamicindex2/cmarquee.htm

3) I have tried to change the color for the links manual by placing
<font color="#FFFFFF"> </font> before each link but it still stays the same color which is blue. Is there anyway I can change the link color to another color? I have been able to change the normal text color but when it comes down to the links I place in the Cross Browser Marquee.. it stays blue.

10-29-2006, 07:08 AM
You'll need to use CSS to do this. Firstly, add something like the below in the HEAD of your page:

<style type="text/css">

font-family: Arial;
color: black;

.marqueestyle a{
color: green;

.marqueestyle a:hover{
color: red;


Then, inside the script, modify your marquee contents to carry your just defined CSS class name:

var marqueecontent='<nobr><span class="marqueestyle">Thank you for visiting <a href="http://www.dynamicdrive.com">Dynamic Drive.</a> If you find this script useful, please consider linking to us by <a href="../link.htm">click here.</a> Enjoy your stay!</span></nobr>'

For a list of available CSS properties, see: http://www.javascriptkit.com/dhtmltutors/cssreference.shtml

10-29-2006, 07:15 AM
thanks soo much .. it worked :)