Forum Moderators: open

Message Too Old, No Replies

Can you use CSS with ASP? If not how can I do this.

ASP with CSS

         

midi25

1:11 pm on Dec 24, 2002 (gmt 0)

10+ Year Member



Hi I have set up a redirect page with a few messages.

I have included a message saying "click here to go back"
This is in html and I have applied a CSS style to it using an Arial 10px font.

I have also included : Response.Write("Thank You")

my problem is that I cannot apply my style sheet to this. So it is in a different font and larger size.

How can I work around this so I can get whatever I write in ASP to match what I write in HTML using CSS.

My style sheet is set up using "ARIAL & 10px"

Thanks

JuDDer

1:20 pm on Dec 24, 2002 (gmt 0)

10+ Year Member



As long as your stylesheet is included in the same page, something like this should do it:

<%
Response.Write("<span class=""yourstyle"">Thank You.</span>")
%>

midi25

1:41 pm on Dec 24, 2002 (gmt 0)

10+ Year Member



Thanks judder that has worked. It just needed the span tags. Although my html dosnt

JuDDer

1:49 pm on Dec 24, 2002 (gmt 0)

10+ Year Member



Excellent :)

BlobFisk

2:14 pm on Dec 24, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It should, I think, inherit it's style from the parent element, be it a <p> tag or the body styline.... is the ASP Response.Write on it's own or within an HTML <p> tag?

midi25

2:25 pm on Dec 24, 2002 (gmt 0)

10+ Year Member



The asp response.write is as how I put it above. If the span works I will stick with that.

Thanks