CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 3rd, 2004, 12:49 PM
Angelos's Avatar
Angelos Angelos is offline
Registered dude
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Location: London
Posts: 6 Angelos User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 27 m 26 sec
Reputation Power: 0
CSS "variables"???

Hello people

I know it can be done with PHP but here goes anyway :

.dude {color: #F43435 };

.dude2 {background-color: ******};

Is there a way to refer to .dude.color ???
Something like :

.dude2 {
background-color: .dude.color;
}

What I am trying to get is the functionality of defining a "constant" colour which then can apply to the multitude of other CSS classes I have...

Any ideas?

Thanks in advance,
Angelos

Reply With Quote
  #2  
Old June 3rd, 2004, 02:01 PM
Akh's Avatar
Akh Akh is offline
|<.+#f@#+.&.|
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2002
Location: norway
Posts: 2,715 Akh User rank is Brigadier General (60000 - 70000 Reputation Level)Akh User rank is Brigadier General (60000 - 70000 Reputation Level)Akh User rank is Brigadier General (60000 - 70000 Reputation Level)Akh User rank is Brigadier General (60000 - 70000 Reputation Level)Akh User rank is Brigadier General (60000 - 70000 Reputation Level)Akh User rank is Brigadier General (60000 - 70000 Reputation Level)Akh User rank is Brigadier General (60000 - 70000 Reputation Level)Akh User rank is Brigadier General (60000 - 70000 Reputation Level)Akh User rank is Brigadier General (60000 - 70000 Reputation Level)Akh User rank is Brigadier General (60000 - 70000 Reputation Level)Akh User rank is Brigadier General (60000 - 70000 Reputation Level)Akh User rank is Brigadier General (60000 - 70000 Reputation Level)Akh User rank is Brigadier General (60000 - 70000 Reputation Level) 
Time spent in forums: 4 Weeks 17 h 42 m 44 sec
Reputation Power: 642
no you can't do that,

but you can group the style for the diffrent element like this:
by seperating them by comma ,

h1, p, .class1, .class2, #id1 {
background:#454545;
}

Reply With Quote
  #3  
Old June 4th, 2004, 08:08 AM
jlk's Avatar
jlk jlk is offline
Perl Jedi
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Location: New Hampshire
Posts: 109 jlk User rank is Sergeant (500 - 2000 Reputation Level)jlk User rank is Sergeant (500 - 2000 Reputation Level)jlk User rank is Sergeant (500 - 2000 Reputation Level)jlk User rank is Sergeant (500 - 2000 Reputation Level)jlk User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 11 h 24 sec
Reputation Power: 15
Quote:
Originally Posted by Angelos
Hello people

I know it can be done with PHP but here goes anyway :

.dude {color: #F43435 };

.dude2 {background-color: ******};

Is there a way to refer to .dude.color ???
Something like :

.dude2 {
background-color: .dude.color;
}

What I am trying to get is the functionality of defining a "constant" colour which then can apply to the multitude of other CSS classes I have...

Any ideas?

Thanks in advance,
Angelos


That will not work since what is expected as a value there is either the color name, the hex value, or the RGB code.

Regards,

jlk

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > CSS "variables"???


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 | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT