PDA

View Full Version : Change font color coding for existing javascript



wilmarth
01-27-2012, 09:05 PM
I am using a DynamicDrive scrolling javascript, and love it. The only thing the script lacks is the ability to change the font style and color. I've tried to add my own, but so far, the coding I try isn't working. I can find my way around html & javascript, but basically am a cut & paster. (I'm a junior high teacher who also is the so-called 'webmaster' for the school district - all self taught, so please don't laugh)

this is the Dynamic Drive page with the script I am using:
http://www.dynamicdrive.com/dynamicindex2/crosstick.htm

I love it - it worked the first time I tried it. I just would like someone to code the additional string(s) to be able to have the option to change font style & color, and also tell me where, in the code, to add the additional code. the old script I used had that, but it won't work with IE9 (which I do NOT use - hate it - but many parents in the district do, which is why I changed scripts)

can anybody help me out?? many, many thanks!!! and remember, thank an old teacher for your eduction - it's payback time - help an old teacher out, please!!:ohttp://www.dynamicdrive.com/forums/images/smilies/redface.gif

auntnini
01-27-2012, 11:55 PM
Correct me if I;m wrong, but that looks like a simple matter of adding to the existing CSS sample some color: ______ values for text, etc.



<style type="text/css">
/*Example CSS for the two demo scrollers*/
#pscroller1{
width: 200px;
height: 100px;
border: 1px solid black;
padding: 5px;
background-color: lightyellow;
color: orange;
}

#pscroller2{
width: 350px;
height: 20px;
border: 1px solid black;
padding: 3px;
color: green;
}
#pscroller2 a{
text-decoration: none; }

a {color: red;}

.someclass{ //class to apply to your scroller(s) if desired
}
</style>

wilmarth
02-07-2012, 01:36 PM
THANK YOU! That worked! as I said above, I'm not really an expert on coding, html, css, javascript...just a teacher who tries darn hard to make a nice website for my school district!

UPDATE: thanks to your response, I got brave enough to mess around some more, and figured out how to code the script to also change the font STYLE and SIZE! I'm feeling so empowered right now!

if you're interested, here's my school district website with the scrolling script: http://ghills.metamora.k12.il.us