| Author |
Topic Search Topic Options
|
Lucent
Groupie
Joined: 06 June 2003
Status: Offline
Points: 111
|
Post Options
Thanks(0)
Quote Reply
Topic: document.write - external css Posted: 14 May 2004 at 4:31pm |
how can I use the external style sheet instead?
document.write("<FONT FACE='Arial, Helvetica, sans-serif' SIZE='1' COLOR='black'>") document.write("Currently - " + year + " / " + month + " / " + day + " " + " " + " " + curTime + " US Central Time") document.write("</FONT>")
|
 |
Semikolon
Senior Member
Joined: 09 September 2003
Location: Norway
Status: Offline
Points: 1718
|
Post Options
Thanks(0)
Quote Reply
Posted: 14 May 2004 at 5:31pm |
|
this isn't related to ASP, but I'll help you anyways
start with the tag you want styled. in this case <font>
in your stylesheet, create a class called for example DateTime by adding .DateTime { attributes } in your stylesheet.
in the font tag add class="DateTime" and thats it..
you can also use the span tag instead of the font tag.
|
 |
dpyers
Senior Member
Joined: 12 May 2003
Status: Offline
Points: 3937
|
Post Options
Thanks(0)
Quote Reply
Posted: 14 May 2004 at 5:54pm |
It's like Semikolon said, but you can get rid of the deprecated font tag altogether. Put something like this in your style sheet
.DateTime { background-color: "FFFFFF"; font-size: small; font-family: "Arial", "Helvetica", "sans-serif" ; color: "#000000"; ] |
You can use this class in any text container tag
<div class="DateTime"> <span class="DateTime"> <p class="DateTime">
Edited by dpyers
|
Lead me not into temptation... I know the short cut, follow me.
|
 |
Lucent
Groupie
Joined: 06 June 2003
Status: Offline
Points: 111
|
Post Options
Thanks(0)
Quote Reply
Posted: 15 May 2004 at 4:16pm |
Like this? But all the words disappeared
document.write("<div class="DateTime">") document.write("Currently - " + year + " / " + month + " / " + day + " " + " " + " " + curTime + " US Central Time") document.write("</div>")
|
 |
Semikolon
Senior Member
Joined: 09 September 2003
Location: Norway
Status: Offline
Points: 1718
|
Post Options
Thanks(0)
Quote Reply
Posted: 15 May 2004 at 4:25pm |
|
what's your CSS?
|
 |
Lucent
Groupie
Joined: 06 June 2003
Status: Offline
Points: 111
|
Post Options
Thanks(0)
Quote Reply
Posted: 15 May 2004 at 8:53pm |
It is an external CSS which is also connected to the document
document.write("<div class="mystyle">") document.write("Currently - " + year + " / " + month + " / " + day + " " + " " + " " + curTime + " US Central Time") document.write("</div>")
This is what I did, and the words disappeared. I'm pretty sure the CSS is attached because I use it else where on the same document.
Thank you for trying to help me 
|
 |
Semikolon
Senior Member
Joined: 09 September 2003
Location: Norway
Status: Offline
Points: 1718
|
Post Options
Thanks(0)
Quote Reply
Posted: 16 May 2004 at 5:16am |
|
so what IS the CSS you are using then? the style formatting in your CSS class is probably the problem
|
 |
dpyers
Senior Member
Joined: 12 May 2003
Status: Offline
Points: 3937
|
Post Options
Thanks(0)
Quote Reply
Posted: 16 May 2004 at 1:42pm |
If you can see the date by left-click-drag over the area where it's supposed to be, the problem is likely to be with the sequence of your css statements, or you reversed the fg, bg colors.
If you don't see it, the problem is with the document.write or the conditions leading up to it.
|
Lead me not into temptation... I know the short cut, follow me.
|
 |