You are here: Re: Define a CSS element as equal to another? « HTML « IT news, forums, messages
Re: Define a CSS element as equal to another?

Posted by Jukka K. Korpela on 01/31/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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация