Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 15-01-2009
Member
 
Join Date: Nov 2008
Posts: 1,066
Factorize a color in CSS

I use a CSS for my site in which the colors are repeated for different elements of my site. I wish I could simply create two colors in my CSS, and use them for different background that I use. Let me clear to factorize my colors. Is it possible? If so, how?
Reply With Quote
  #2  
Old 15-01-2009
XSI XSI is offline
Member
 
Join Date: May 2008
Posts: 271
Re: Factorize a color in CSS

It was not the same definition of "factorizing". Are you using the id or class to define the elements of your style? Can you provide us the site link so that we can move further in a simpler way.
Reply With Quote
  #3  
Old 15-01-2009
Member
 
Join Date: Nov 2008
Posts: 1,066
Re: Factorize a color in CSS

Factorise may not be correct the term for this. Well I use my class to define elements ....

The problem is that nothing is currently online. In fact it is late. For many of my items, I use the class in which I care a "background-color: red;" for example.

In fact I was wondering if you could not use a reference style "reference_rouge: red;" at the top of the document and call reference_rouge in my class in CSS.
Reply With Quote
  #4  
Old 15-01-2009
Member
 
Join Date: May 2008
Posts: 685
Re: Factorize a color in CSS

And how could this be?
you want to create a sheet of references to simplify CSS that it is already a kind of leaf of "references" which simplifies the html ... there's no end to this rhythm ...
Reply With Quote
  #5  
Old 15-01-2009
XSI XSI is offline
Member
 
Join Date: May 2008
Posts: 271
Re: Factorize a color in CSS

Quote:
Originally Posted by Connect_Me View Post
In fact I was wondering if you could not use a reference style "reference_rouge: red;" at the top of the document and call reference_rouge in my class in CSS.
This is the same as "background-color: red;" in your class in all of your CSS.

Otherwise I do not know if that applies to the background to the div tag (I don't know what is your target, but acknowledge that they are DIV), and on rare div that should not be inherited with this background, put a background-color: none ...
Reply With Quote
  #6  
Old 15-01-2009
Member
 
Join Date: Nov 2008
Posts: 1,066
Re: Factorize a color in CSS

In fact, the idea was to change the color of the site without changing a reference, not involved in every class.

Clearly, if my site consists of 3 main colors, applied on borders, background and so I'd like to have 3 references modifier (for example color_1, color_2 and color_3).

I'm working on a site that allows the creation of space in the subdomain of my site. The problem is that I want to leave the possibility for a user to select the colors of its space.
Reply With Quote
  #7  
Old 15-01-2009
XSI XSI is offline
Member
 
Join Date: May 2008
Posts: 271
Re: Factorize a color in CSS

nothing prevents to declare independently the background color of the rest!

Example: this code does not pose any pb

Code:
  . Line0 {font-size: 9px}
  . Line1 {height: 15px}
  . Line2 {height: 25px} 
  . Line3 {height: 20px} 
  . Line4 {height: 35px}
  . Line 5 {height: 22px} 
  . Line6 {height: 37px} 
  . Line0. Line1. Line2. Line3. Line4. Line 5. Line6 {background-color: # FF0000}
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Factorize a color in CSS"
Thread Thread Starter Forum Replies Last Post
Is there any option to change the color of friend/foe to help color blinds play Birds of Steel? I M Perfect Video Games 3 18-03-2012 07:33 PM
Color Alignment in HP Color LaserJet CM1312 Hameeda-K Hardware Peripherals 4 26-11-2011 04:45 PM
Make Active windows border color and taskbar icon color pokemon5 Customize Desktop 5 04-12-2010 11:27 PM
Changing color in a GIF Gap meer Customize Desktop 5 10-03-2009 10:01 PM
XP Color theme with dark window background color? sayeed Windows XP Support 4 27-06-2008 01:42 AM


All times are GMT +5.5. The time now is 03:50 AM.