From: "Philipp Lenssen" <phil@mrinfo.de>
Newsgroups: comp.infosystems.www.authoring.stylesheets
Subject: Re: In a declaration of a class how do I refer to another class?
Date: Mon, 5 Nov 2001 12:54:40 +0100
Message-ID: <9s5ujk$7u8$1@swifty.westend.com>
Newsgroups: comp.infosystems.www.authoring.stylesheets
Subject: Re: In a declaration of a class how do I refer to another class?
Date: Mon, 5 Nov 2001 12:54:40 +0100
Message-ID: <9s5ujk$7u8$1@swifty.westend.com>
"Conny" <cr@projekte3000.de> wrote in message
news:b5ee842d.0111050313.604f1392@posting.google.com...
>..
> In a declaration of a class how do I refer to another class?
>..
> .text {
> font-size : 10pt;
> }
>
> and now I want another class
>
> .tbox {
> border-color : #0066FF;
> border-width : 1px;
> /* Here I would like to refer to 'text' */
> }
>..
It's a bit unclear to me what you actually want to achieve.
If you want to select a class which is inside another class in the HTML,
just use a space between the class names:
.text .tbox
{
/* is applied to elements of
class "tbox" within elements of
class "text"
*/
}
If you just want to group property/ value blocks together to decrease
redundancy, you might do this:
.text
{
/* everything that's unique to "text"
*/
}
.tbox,
.text
{
/* everything "text" and "tbox" have
in common that is not listed as property
in the first "text" selector
*/
}
--
Philipp Lenssen
M+R Infosysteme
http://www.mrinfo.de
