My birthday countdown, the fonts, mainly |
![]() ![]() |
My birthday countdown, the fonts, mainly |
Apr 13 2006, 11:51 PM
Post
#1
|
|
|
~Phoebe~ ![]() ![]() ![]() ![]() Group: Member Posts: 118 Joined: Apr 2005 Member No: 130,046 |
Hey! Well, I found the code for my birthday countdown, only I was wondering how I'd customize the font
CODE <!-- begin code provided by createblog.com -->
<!-- begin code provided by createblog.com --> </tr><script language="JavaScript1.2"> var today = new Date; var Future0 = new Date; var BirthMonth = 5; var BirthDate = 16; var BirthYear = 1990; BirthMonth--; Future0.setMonth(BirthMonth, BirthDate); if (Date.parse(today) > Date.parse(Future0)) { Future0.setFullYear(today.getYear()+1); age = (today.getYear() - BirthYear) + 1; } else {age = today.getYear() - BirthYear;} if (age % 10 == 0) ageend = 'th'; else if (age % 10 == 4) ageend = 'th'; else if (age % 10 == 5) ageend = 'th'; else if (age % 10 == 6) ageend = 'th'; else if (age % 10 == 7) ageend = 'th'; else if (age % 10 == 8) ageend = 'th'; else if (age % 10 == 9) ageend = 'th'; else if (age % 10 == 1) ageend = 'st'; else if (age % 10 == 2) ageend = 'nd'; else if (age % 10 == 3) ageend = 'rd'; var faraevent = "<font color=#80BF40><i>my birthday</font>"; today1 = Date.parse(today); future1 = Date.parse(Future0); secleft = future1 - today1; miliday = 24 * 60 * 60 * 1000; daysleft = secleft/miliday; daysleftint = Math.round(daysleft); if (daysleftint > 1) document.write(" ", daysleftint, " days until <font color=#80BF40>my <i>", age, ageend, "</i> birthday</font>"); else if (daysleftint == 1) document.write("<font color=#80BF40>my <i>", age, ageend, "</i> birthday</font> is tomorrow"); else if (today1 == future1) document.write("<font color=#80BF40>my <i>", age, ageend, "</i> birthday</font> is today"); else document.write("passed"); </script><br> <!-- end code provided by createblog.com --> <!-- end code provided by createblog.com --> |
|
|
|
Apr 14 2006, 12:02 AM
Post
#2
|
|
![]() You'll find me in your dreams. ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Official Member Posts: 8,536 Joined: Mar 2005 Member No: 114,010 |
Ya see all the font tags in this section of code? Change those. ^_^
CODE if (daysleftint > 1) Other than that, it's just like any other time you'd use the font tag.
document.write(" ", daysleftint, " days until <font color=#80BF40>my <i>", age, ageend, "</i> birthday</font>"); else if (daysleftint == 1) document.write("<font color=#80BF40>my <i>", age, ageend, "</i> birthday</font> is tomorrow"); else if (today1 == future1) document.write("<font color=#80BF40>my <i>", age, ageend, "</i> birthday</font> is today"); else document.write("passed"); |
|
|
|
Apr 14 2006, 12:05 AM
Post
#3
|
|
|
~Phoebe~ ![]() ![]() ![]() ![]() Group: Member Posts: 118 Joined: Apr 2005 Member No: 130,046 |
Ok, I see the font tags (you are talking about the (/font) aren't you?) Sorry, but I'm not all up on the HTML so I'm unsure exactly on how to put the different font in :-/
I'd like to make all the words in Wendy Medium font |
|
|
|
Apr 14 2006, 01:52 AM
Post
#4
|
|
![]() You'll find me in your dreams. ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Official Member Posts: 8,536 Joined: Mar 2005 Member No: 114,010 |
[ http://www.w3schools.com/tags/tag_font.asp ]
[ http://www.webdiner.com/annexe/font/font.htm ] The font tag is really useful, I suggest you learn how to use it. Of course, just don't use the quotes or your code will stop working. |
|
|
|
Apr 14 2006, 02:05 PM
Post
#5
|
|
|
~Phoebe~ ![]() ![]() ![]() ![]() Group: Member Posts: 118 Joined: Apr 2005 Member No: 130,046 |
Alright, I will! Thank you =D
|
|
|
|
Apr 14 2006, 11:41 PM
Post
#6
|
|
![]() say maydayism. ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Staff Alumni Posts: 7,447 Joined: Jun 2004 Member No: 26,344 |
I'll close this for the time being.
If you have any further problems on this, PM me to have it reopened. [ TOPIC CLOSED ] |
|
|
|
![]() ![]() |