|  | |  |
03-07-2005, 08:28 PM
|
#1 (permalink)
| | Registered User
Join Date: Mar 2005
Posts: 2
| how do I add a stylesheet to this script? Okay I found this script to work with font type and color...
Now My question is how can I add a stylesheet to the code and where should I put it..
the name of my stylesheet name is stylesheet.css and is in the same directory that this script is in.
I don't want people to be able to change the text size on the view drop down menu.
Thanks for your help!
__________________________________________________ ___________________________
<script>
var mydate=new Date()
var year=mydate.getYear()
if (year < 1000)
year+=1900
var day=mydate.getDay()
var month=mydate.getMonth()
var daym=mydate.getDate()
if (daym<10)
daym="0"+daym
var dayarray=new Array("Sunday","Monday","Tuesday","Wednesday","Thu rsday","Friday","Saturday")
var montharray=new Array("January","February","March","April","May"," June","July","August","September","October","Novem ber","December")
document.write("<small><font size='3' font color='CCCCCC' face='Arial'><strong><b>///Welcome to The Office: " +dayarray[day]+", "+montharray[month]+" "+daym+", "+year+"</b></font></small>")
</script> |
| |
03-16-2005, 02:10 PM
|
#2 (permalink)
| | Registered User
Join Date: Mar 2005
Posts: 6
| If you want to add a style class, let's say for example class="maintext" or something, you could do this: Code: <script>
var mydate=new Date()
var year=mydate.getYear()
if (year < 1000)
year+=1900
var day=mydate.getDay()
var month=mydate.getMonth()
var daym=mydate.getDate()
if (daym<10)
daym="0"+daym
var dayarray=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
var montharray=new Array("January","February","March","April","May","June","July","August","September","October","November","December")
document.write("<div class="maintext><small><font size='3' font color='CCCCCC' face='Arial'><strong><b>///Welcome to The Office: " +dayarray[day]+", "+montharray[month]+" "+daym+", "+year+"</b></font></small></div>")
</script> You would have to specify your CSS in the <HEAD> area of your page.
Ross |
| |
03-16-2005, 02:37 PM
|
#3 (permalink)
| | Registered User
Join Date: Mar 2005
Posts: 2
| I tried but it doesn't seem to work
my style sheet is stylesheet.css
What would I need to do?
Thanks for the help |
| |
03-24-2005, 11:29 AM
|
#4 (permalink)
| | Registered User
Join Date: Mar 2005 Location: Columbus, OH
Posts: 5
| You could use it as an external CSS. In the HEAD of your code, you would add this: HTML Code: <link REL="StyleSheet" TYPE="text/css" HREF="stylesheet.css"> That should work unless I am misunderstanding the question/problem at hand. |
| | | Thread Tools | | | | Display Modes | Linear Mode |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | All times are GMT -8. The time now is 02:40 AM. |
Copyright © 2000-2008, Milano Interactive Web Hosting provided by Portal 360 Web Hosting |  | |