...

View Full Version : Help - I can't get the font color to change



tmatava
08-19-2004, 04:00 PM
I am trying to get the color of my current date to change to white rather than black. I can't seem to get it to work any help will be greatly appreciated.
here is the code:
<td
style="vertical-align: bottom; background-color: rgb(102, 0, 0);">
<script>
/*Current date script credit:
JavaScript Kit (www.javascriptkit.com)
Over 200+ free scripts here!
*/

var mydate=new Date()
var year=mydate.getYear()
if (year < 1000)
year+=1900
var day=mydate.getDay()
var month=mydate.getMonth()+1
if (month<10)
month="0"+month
var daym=mydate.getDate()
if (daym<10)
daym="0"+daym
document.write("<small><font color='ffffcc' face='Arial'><b>"+month+"/"+daym+"/"+year+"</b></font></small>")
</script>
<br>
</td>

this is the page:
http://www.webspace.umd.edu/amercult/InternmentArt/AAST1/index2.html

Roy Sinclair
08-19-2004, 04:41 PM
<td
style="vertical-align: bottom; background-color: rgb(102, 0, 0);font-size: smaller; color: #ffc;font-family: Arial;font-weight: bold;">
<script>
/*Current date script credit:
JavaScript Kit (www.javascriptkit.com)
Over 200+ free scripts here!
*/

var mydate=new Date()
var year=mydate.getYear()
if (year < 1000)
year+=1900
var day=mydate.getDay()
var month=mydate.getMonth()+1
if (month<10)
month="0"+month
var daym=mydate.getDate()
if (daym<10)
daym="0"+daym
document.write(month+"/"+daym+"/"+year)
</script>
<br>
</td>


Try it using pure CSS instead of partly CSS and partly presentational html.

tmatava
08-19-2004, 04:57 PM
Roy - thanks for the code - it looks great!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum