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 Noozer on 10/03/62 11:45

"Jukka K. Korpela" <jkorpela@cs.tut.fi> wrote in message
news:e25210$i9q$1@phys-news4.kolumbus.fi...
> Noozer wrote:
>
>> Is there a way to refer to another element when defining they properties
>> of an element in CSS?
>
> No.

Drat.

>> 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."?

"i.e." = "in other words" or "like this" is what I meant. "e.g." = "for
example", would have worked as well

>> .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; }

Yup!

> though with much more meaningful class names and identifiers.

Well... "tab" is about as specific as I can get as the page is generated
dynamically and it's for a "tab" on the page, used to select a group of
related data. I guess "page" would have worked as well.

I was just hoping to build a CSS template. Later, when I was designing a
webpage, I would copy the template into the working directory and just add
the elements from the page, referring to the existing elements in the
template.

In other words, my template would already have a "tab" style defined. When I
put the template to use I would add my custom element definitions (
"index_tab", "useredit_tab", etc.) specific to my webpage, relatingthem it
to the already existing "tab" definition found in my template.

 

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

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