Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 Dynamic stylesheet
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

TastyNutz
Junior Member

USA
251 Posts

Posted - 01 December 2007 :  14:30:30  Show Profile  Visit TastyNutz's Homepage
I'm trying to set up a dynamic stylesheet with certain variables pulled fom the database. It's working as expected, with the exception of the "body" attributes. I can't get any of them to work, whether from the database or hard coded.

Dynamic Stylesheet


PowerQuad Disability Support Forum

cripto9t
Average Member

USA
881 Posts

Posted - 01 December 2007 :  16:50:28  Show Profile
I've had this problem in the past. I'm not sure but I think it was an IE browser issue. I ended up putting the color in the <body> tag. You could also try a class.

    _-/Cripto9t\-_
Go to Top of Page

phy1729
Average Member

USA
589 Posts

Posted - 01 December 2007 :  18:41:21  Show Profile
Can you give a link?
Go to Top of Page

TastyNutz
Junior Member

USA
251 Posts

Posted - 01 December 2007 :  20:51:38  Show Profile  Visit TastyNutz's Homepage
I'm not sure why it happens, but I noticed the first style in my stylesheet fails to work. It doesn't matter which one it is, but whichever is the first defined just doesn't do anything. I got around it by adding a "dummy" style first, like so...


.blank {
}

body {
	background-image: url("<%= body_bgimage %>");
	background-color: <%= body_bgcolor %>;
}

Whatever works, right?

I linked to my stylesheet in my original post.

Dynamic_Stylesheet.txt


PowerQuad Disability Support Forum
Go to Top of Page

phy1729
Average Member

USA
589 Posts

Posted - 01 December 2007 :  22:00:34  Show Profile
Sorry, I didn't see it. Also, could you give a link to what it's outputting. Usually I have it to whenever I update the db containing the values the script also creates or overwrites my style sheet. (I do this with a db backed rss feed but same concept.) Although, I do this in php so I can't help with this. This also makes it a static file and not made each time someone requests it and with a style sheet I would imagine quite a lot. I don't know what's wrong until I see what's being outputted.
Go to Top of Page

cripto9t
Average Member

USA
881 Posts

Posted - 02 December 2007 :  10:23:13  Show Profile
quote:
Originally posted by TastyNutz

I'm not sure why it happens, but I noticed the first style in my stylesheet fails to work. It doesn't matter which one it is, but whichever is the first defined just doesn't do anything. I got around it by adding a "dummy" style first, like so...


thats it! thats the same problem I was having. It's been awhile since I messed with external style sheets. I went back and looked at all my old work and all the css have a dummy class to start it off. I wish I'd left some notes, it seems like it was browser specific though.

    _-/Cripto9t\-_
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.2 seconds. Powered By: Snitz Forums 2000 Version 3.4.07