|
Posted by Jukka K. Korpela on 10/18/29 11:45
Noozer wrote:
> Is there a way to refer to another element when defining they properties of
> an element in CSS?
No.
> ie:
The abbreviation "ie" (usually written as "i.e.") means "that is" (from
Latin "id est"). Is the following all you have in mind, or did you
actually mean "e.g."?
> .tab { display: block; margin:0; padding: 3px; }
> #tab1 { [tab]; background-color: #DDD; }
> #tab 2 { [tab]; background-color: #FDD; }
Why don't you explain what you wish to accomplish, instead of a vague
question and some fantasy-CSS code?
You _probably_ want to do
..tab, #tab1, #tab2 {
display: block;
margin: 0;
padding: 0.2em; }
#tab1 { background: #ddd; color: black; }
#tab2 { background: #fdd; color: black; }
though with much more meaningful class names and identifiers.
Navigation:
[Reply to this message]
|