0
   

adding font, color and alignment to javascript code

 
 
sdburns
 
Reply Tue 15 Jul, 2014 07:15 am
I would like to add 20 size ariel font, maroon color and center alignment to the code below, thanks.


<script type="text/javascript">

today = new Date();

BigDay = new Date("October 1, 2015");
msPerDay = 24 * 60 * 60 * 1000 ;
timeLeft = (BigDay.getTime() - today.getTime());
e_daysLeft = timeLeft / msPerDay;
daysLeft = Math.floor(e_daysLeft);
e_hrsLeft = (e_daysLeft - daysLeft)*24;
hrsLeft = Math.floor(e_hrsLeft);
minsLeft = Math.floor((e_hrsLeft - hrsLeft)*60);
document.write("<BR> <H4>" + daysLeft + " days " + hrsLeft +" hours and " + minsLeft + " minutes </H4> <P>");

</script>
  • Topic Stats
  • Top Replies
  • Link to this Topic
Type: Question • Score: 0 • Views: 1,739 • Replies: 1
No top replies

 
sdburns
 
  1  
Reply Tue 15 Jul, 2014 08:08 am
@sdburns,
I figured it out:

document.write("<font color='800000'> <H2> <CENTER>" + daysLeft + " days " + hrsLeft +" hours and " + minsLeft + " minutes </H2> <P>");
0 Replies
 
 

Related Topics

 
  1. Forums
  2. » adding font, color and alignment to javascript code
Copyright © 2024 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.03 seconds on 12/27/2024 at 01:26:04