Results 1 to 6 of 6

Thread: Counting Up script text color

  1. #1
    Join Date
    Feb 2010
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Counting Up script text color

    http://www.dynamicdrive.com/dynamicindex6/countingup.htm I would like to change the font color to red, is this possible?
    Thanks

  2. #2
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Try changing:
    Code:
    .dcountstyle{ /*Example CSS to style count up output*/
    font: bold 16px Arial;
    padding: 3px;
    }
    To:
    Code:
    .dcountstyle{ /*Example CSS to style count up output*/
    font: bold 16px Arial;
    padding: 3px;
    color: red;
    }
    Jeremy | jfein.net

  3. #3
    Join Date
    Feb 2010
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    That changes Date Line
    how about Top Line Text
    Prince Charles and Camilla Parker have been married for:

  4. #4
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Change:
    Code:
    mycountainer.innerHTML="Prince Charles and Camilla Parker have been married for:"+ result['days']+" days "+result['hours']+" hours "+result['minutes']+" minutes
    To:
    Code:
    mycountainer.innerHTML="<span style='color:red'>Prince Charles and Camilla Parker have been married for:</span>"+ result['days']+" days "+result['hours']+" hours "+result['minutes']+" minutes
    Jeremy | jfein.net

  5. #5
    Join Date
    Feb 2010
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Prince Charles and Camilla Parker have been married for (is now red)
    1773 days 2 hours 27 minutes 56 seconds Has gone backto black
    Both need to be red

  6. #6
    Join Date
    Aug 2004
    Posts
    10,140
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    If you do both of what Nile suggested, that is, change the CSS:

    Code:
    .dcountstyle{ /*Example CSS to style count up output*/
    font: bold 16px Arial;
    padding: 3px;
    color: red;
    }
    plus make the necessary changes inside the output to include the part in red:

    Code:
    	mycountainer.innerHTML="<span style='color:red'>Prince Charles and Camilla Parker have been married for: <br /><span class='dcountstyle'>"+result['days']+" <sup>days</sup> "+result['hours']+" <sup>hours</sup> "+result['minutes']+" <sup>minutes</sup> "+result['seconds']+" <sup>seconds</sup></span></span>"
    That should do it.
    DD Admin

  7. The Following User Says Thank You to ddadmin For This Useful Post:

    GunSlinger (02-16-2010)

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
  •