By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,880 Members | 1,817 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,880 IT Pros & Developers. It's quick & easy.

CSS Assing one class to another.

P: n/a
How do I assign one class to another?

Such as

..class_a
{
.class_b
}
And the property of a class to another:

..class_a{
color: .class_b.color;
}

Of course neither work.

Mar 5 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Rik
de*******@gmail.com <de*******@gmail.comwrote:
How do I assign one class to another?

You don't. Either give the element both classes, or define the css like:
..class_a, .class_b{color:#000;}
or possibly make the css-file with a server side script, allowing you to
change a color in one location only.

Has this been a homework assignment that this awkward question has been
asked twice within a day?

--
Rik Wasmus
Posted on Usenet: any site claiming this as original content or me as an
contributing member is stealing content.
Ask Smart Questions: http://tinyurl.com/anel
Mar 5 '07 #2

P: n/a
On Mar 5, 11:39 am, Rik <luiheidsgoe...@hotmail.comwrote:
deduct...@gmail.com <deduct...@gmail.comwrote:
How do I assign one class to another?

You don't. Either give the element both classes, or define the css like:
.class_a, .class_b{color:#000;}
or possibly make the css-file with a server side script, allowing you to
change a color in one location only.

Has this been a homework assignment that this awkward question has been
asked twice within a day?

--
Rik Wasmus
Posted on Usenet: any site claiming this as original content or me as an
contributing member is stealing content.
Ask Smart Questions:http://tinyurl.com/anel
I know I saw it some where before. Some type of reference syntax. It
exists.

Mar 5 '07 #3

P: n/a
Rik
de*******@gmail.com <de*******@gmail.comwrote:
On Mar 5, 11:39 am, Rik <luiheidsgoe...@hotmail.comwrote:
>deduct...@gmail.com <deduct...@gmail.comwrote:
How do I assign one class to another?

You don't. Either give the element both classes, or define the css like:
.class_a, .class_b{color:#000;}
or possibly make the css-file with a server side script, allowing you to
change a color in one location only.

Has this been a homework assignment that this awkward question has been
asked twice within a day?

I know I saw it some where before. Some type of reference syntax. It
exists.
Not in pure css.

Please don't quote signatures.
--
Rik Wasmus
Posted on Usenet: any site claiming this as original content or me as an
contributing member is stealing content.
Ask Smart Questions: http://tinyurl.com/anel
Mar 5 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.