3 replies [Last post]
Hughes
Offline
newbie
Last seen: 17 years 22 weeks ago
Joined: 2003-05-25
Posts: 2
Points: 0

Is it possible to pass an ASP variable into a CSS file? I have a color value that is dynamic and I would like the color defined in the class to be dynamic as well.

Thank you!

Tags:
dJomp
dJomp's picture
Offline
Enthusiast
Last seen: 4 years 38 weeks ago
Joined: 2003-03-23
Posts: 422
Points: 0

Passing ASP variables into a CSS file

Can't do it that way I'm afraid, but you could add it in the top of the generated HTML page? i.e.

<head>
<style>
.myclass {
  color = #ffffff;
}
</style>
</head>

You know you're a geek when you try to shoo a fly away from the monitor with your cursor.

Hughes
Offline
newbie
Last seen: 17 years 22 weeks ago
Joined: 2003-05-25
Posts: 2
Points: 0

Passing ASP variables into a CSS file

Sometimes, the most obvious answers are right in front of you. Wish I had thought of that. Thanks for your help!

chris hester
Offline
Regular
UK
Last seen: 16 years 50 weeks ago
UK
Joined: 2003-11-07
Posts: 21
Points: 0

Passing ASP variables into a CSS file

It is possible to use ASP to create dynamic CSS. Otherwise your page is always static. This thread gives details:

http://www.webmasterworld.com/forum83/2201.htm