PDA

View Full Version : Counting Up script text color



GunSlinger
02-14-2010, 09:50 PM
http://www.dynamicdrive.com/dynamicindex6/countingup.htm I would like to change the font color to red, is this possible?
Thanks

Nile
02-14-2010, 09:55 PM
Try changing:


.dcountstyle{ /*Example CSS to style count up output*/
font: bold 16px Arial;
padding: 3px;
}

To:


.dcountstyle{ /*Example CSS to style count up output*/
font: bold 16px Arial;
padding: 3px;
color: red;
}

GunSlinger
02-15-2010, 12:09 PM
That changes Date Line
how about Top Line Text
Prince Charles and Camilla Parker have been married for:

Nile
02-15-2010, 01:59 PM
Change:


mycountainer.innerHTML="Prince Charles and Camilla Parker have been married for:"+ result['days']+" days "+result['hours']+" hours "+result['minutes']+" minutes

To:


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

GunSlinger
02-15-2010, 08:01 PM
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

ddadmin
02-15-2010, 10:57 PM
If you do both of what Nile suggested, that is, change the CSS:


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


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.