Results 1 to 3 of 3

Thread: Change font color coding for existing javascript

  1. #1
    Join Date
    Jan 2012
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Change font color coding for existing javascript

    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!!http://www.dynamicdrive.com/forums/images/smilies/redface.gif
    Last edited by wilmarth; 01-27-2012 at 09:07 PM. Reason: additional information

  2. #2
    Join Date
    Oct 2006
    Location
    New York, NY, USA
    Posts
    262
    Thanks
    42
    Thanked 24 Times in 24 Posts

    Default CSS color: ___ for text

    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.

    Code:
    <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>

  3. The Following User Says Thank You to auntnini For This Useful Post:

    wilmarth (02-07-2012)

  4. #3
    Join Date
    Jan 2012
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    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
    Last edited by wilmarth; 02-07-2012 at 01:55 PM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •