472,962 Members | 2,482 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,962 software developers and data experts.

css referencing

Hi All,

Can anyone tell me if it's possible to accomplish the following:

a {
background:black;
}

b {
background:blue;
}

c {
background:green;
}

a,b,c {
color: white;
}
In a format such as:

a {
background:black;
color : foreground;
}

b {
background:blue;
color : foreground;
}

c {
background:green;
color : foreground;
}

foreground {
color: white;
}

TIA

~ Big Dog

Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Feb 3 '08 #1
4 1877
On 2008-02-03, Big Dog <bi****@traxic.comwrote:
Hi All,

Can anyone tell me if it's possible to accomplish the following:
[...]
In a format such as:

a {
background:black;
color : foreground;
[...]
foreground {
color: white;
}
It's not possible.

Although there's nothing to stop you pre-processing your CSS with
something if you want, if you need that.
Feb 3 '08 #2
Thanks Ben!

I had a feeling that was the answer but wanted to get a definative answer
instead of spinning my wheels.

~ Big Dog

"Ben C" <sp******@spam.eggswrote in message
news:sl*********************@bowser.marioworld...
On 2008-02-03, Big Dog <bi****@traxic.comwrote:
>Hi All,

Can anyone tell me if it's possible to accomplish the following:
[...]
>In a format such as:

a {
background:black;
color : foreground;
[...]
>foreground {
color: white;
}

It's not possible.

Although there's nothing to stop you pre-processing your CSS with
something if you want, if you need that.


Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Feb 4 '08 #3
Big Dog wrote:
Hi All,

Can anyone tell me if it's possible to accomplish the following:

a {
background:black;
}

b {
background:blue;
}

c {
background:green;
}

a,b,c {
color: white;
}
In a format such as:

a {
background:black;
color : foreground;
}

b {
background:blue;
color : foreground;
}

c {
background:green;
color : foreground;
}

foreground {
color: white;
}

TIA

~ Big Dog

Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
As far as I know no you can't. The format would be more like;
a { background-color: black;
the foreground color would be
color: white;
}

b {
background-color: blue;
color: white;
}

c {
background-color: green;
color: white;
}

and the foreground col0or would be color: white;

as in

body {
background-color: black;
color: white;
}

This would give a black background with white text. I don't know if this
is what you are looking for.
Feb 11 '08 #4
Jim Palsgrove wrote:
Big Dog wrote:
>Hi All,

Can anyone tell me if it's possible to accomplish the following:

a {
background:black;
}

b {
background:blue;
}

c {
background:green;
}

a,b,c {
color: white;
}
In a format such as:

a {
background:black;
color : foreground;
OP has "foreground" as CSS "variable"

<snip>
>
This would give a black background with white text. I don't know if this
is what you are looking for.

As Ben said. No. CSS does not have variables. Look up the "cascade" in
Cascading StyleSheets for how the cascade can work for you.

BTW No such groups on my server alt.html.css & uiuc.org.css

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Feb 12 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: xcomm | last post by:
Hi All, <?php $vars= array("_SERVER","_SERVER","_SERVER","_SERVER","_SERVER","_SERVER"); foreach($vars as $var) { if(isset($$var))echo("$var: ${$var}<br>\n"); } ?> php.net:
1
by: student | last post by:
while compiling on: SunOS 5.8 Generic_108528-27 sun4u sparc SUNW,Sun-Fire-280R I get the following error: Undefined first referenced symbol ...
2
by: sreddy | last post by:
I am trying to write a sql query on self referencing table. Just to brief ..Database is related to a Hiring department of the Qwest company. I need to generate a Report used by in HR...
2
by: Simon | last post by:
Am using the following code. <script language="JavaScript1.2"> function setquantity(productindex,productquantity) { //create the reference object irefname_none = eval("document." +...
6
by: jstaggs39 | last post by:
I want to create a Dcount and an If...Then...Else statement to count the number of records in a table based on the date that is entered to run the form. The If....Else statment comes in because if...
6
by: Mikey_Doc | last post by:
Hi We are running cms 2002, Framework 1.0 with Visual studio 2002. We have just upgraded to Framework 1.1 and visual studio 2003. All of our database connection strings are stored within the...
3
by: gary | last post by:
Hi, I am trying to reference an anchor in a user control with a url. This worked in 1.1 but no longer works in 2.0. The ascx control is located in a "/include" folder If you have a...
9
by: Brett Romero | last post by:
Say I have a library (A.dll) with a method that accepts a collection of a specific type. The type is defined in B.dll. In A.dll, I need to loop through this collection and reference fields of...
1
by: Tim F | last post by:
Problem: I'm receiving the error "File or assembly name XXXXX or one of its dependencies, was not found." when trying to execute code in an assmebly that has both a strong-name and has been...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.