Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - document.write - external css
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

document.write - external css

 Post Reply Post Reply Page  12>
Author
Lucent View Drop Down
Groupie
Groupie


Joined: 06 June 2003
Status: Offline
Points: 111
Post Options Post Options   Thanks (0) Thanks(0)   Quote Lucent Quote  Post ReplyReply Direct Link To This Post 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 + "&nbsp;" + "&nbsp;" +  "&nbsp;" + curTime + " US Central Time")
  document.write("</FONT>")

Back to Top
Semikolon View Drop Down
Senior Member
Senior Member


Joined: 09 September 2003
Location: Norway
Status: Offline
Points: 1718
Post Options Post Options   Thanks (0) Thanks(0)   Quote Semikolon Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
Lucent View Drop Down
Groupie
Groupie


Joined: 06 June 2003
Status: Offline
Points: 111
Post Options Post Options   Thanks (0) Thanks(0)   Quote Lucent Quote  Post ReplyReply Direct Link To This Post 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 + "&nbsp;" + "&nbsp;" +  "&nbsp;" + curTime + " US Central Time")
  document.write("</div>")

Back to Top
Semikolon View Drop Down
Senior Member
Senior Member


Joined: 09 September 2003
Location: Norway
Status: Offline
Points: 1718
Post Options Post Options   Thanks (0) Thanks(0)   Quote Semikolon Quote  Post ReplyReply Direct Link To This Post Posted: 15 May 2004 at 4:25pm
what's your CSS?
Back to Top
Lucent View Drop Down
Groupie
Groupie


Joined: 06 June 2003
Status: Offline
Points: 111
Post Options Post Options   Thanks (0) Thanks(0)   Quote Lucent Quote  Post ReplyReply Direct Link To This Post 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 + "&nbsp;" + "&nbsp;" +  "&nbsp;" + 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

Back to Top
Semikolon View Drop Down
Senior Member
Senior Member


Joined: 09 September 2003
Location: Norway
Status: Offline
Points: 1718
Post Options Post Options   Thanks (0) Thanks(0)   Quote Semikolon Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply Page  12>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.