Programming Tools
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingProgramming Tools

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old August 27th, 2002, 01:04 AM
tim tim is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Posts: 62 tim User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 12 m 9 sec
Reputation Power: 7
Send a message via ICQ to tim
How do you talk to a CSS file?

I have completed a site that is able to change its own template, color schemes and so forth. What I did was, when user change the settings, different style sheet is called.

And each one of these stylesheet will have pre-defined settings that says, ok, this text is red and that table's border is green with this and that size ....balablaalla.....

However, would it be possible to use only just 'ONE' CSS file, and directly change each and every one of its CSS properties like

font-style: <?=$font_style?>


????????????
I thought i have seen it being done before.bold
__________________
Beginner

Reply With Quote
  #2  
Old August 27th, 2002, 01:52 AM
Ben Rowe
Guest
Dev Articles Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
you could call the settings from a database and, echo it out into the format of a style sheet, but you would have to use the .php extension.

Reply With Quote
  #3  
Old August 27th, 2002, 02:50 AM
tim tim is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Posts: 62 tim User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 12 m 9 sec
Reputation Power: 7
Send a message via ICQ to tim
That would be possible if I embed directly my CSS properties at the top of the file.

But how do I do that if I am linking a CSS file in? Can I pass in values to css files?

...like
style.css?value1=value2&...........

Reply With Quote
  #4  
Old August 27th, 2002, 04:02 AM
Ben Rowe
Guest
Dev Articles Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
you could have a linked style sheet something like this

style.php?value1=value2&...........

and call that, or you chould call the style.php file and that calls the values from a database

Reply With Quote
  #5  
Old August 27th, 2002, 02:26 PM
markerdave markerdave is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: Illinois, USA
Posts: 71 markerdave User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Tim,

Hi! Are you trying to dynamically change style attributes? If so, you can do this using JavaScript and DOM (Document Object Model). If I had a section of font like this:

<div id="sample">This is some text.</div>

I can change the color of that text to blue with this JavaScript line:

document.getElementById("sample").style.color="blue"

All of the style attributes can be changed in this manner. Is this what you are looking for?

Reply With Quote
  #6  
Old August 27th, 2002, 08:55 PM
tim tim is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Posts: 62 tim User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 12 m 9 sec
Reputation Power: 7
Send a message via ICQ to tim
yeah something like that. thanks. i wiil try both.

Reply With Quote
  #7  
Old August 27th, 2002, 10:29 PM
Ben Rowe
Guest
Dev Articles Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
When the user logs in you could save there setting with there username and password in the database.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingProgramming Tools > How do you talk to a CSS file?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

SlickEdit




© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway