You are here: Re: CSS: Class error « HTML « IT news, forums, messages
Re: CSS: Class error

Posted by Luigi Donatello Asero on 02/26/06 03:56

"Els" <els.aNOSPAM@tiscali.nl> skrev i meddelandet
news:qiocypkp2j1a.ruzvj2lcxrov.dlg@40tude.net...
> Luigi Donatello Asero wrote:
>
> >>>>> What is wrong with this?
> >>>>> .subsubsection#sverige
> >>>>>
> >>>>> I get a "class error"
> >>>>
> >>>> Of course you do.
> >>>>
> >>>> So, what is it, a class? (.susubsection) an id? (#sverige)?
> >>>> Can't make the two into a hybrid.
> >>>
> >>> "subsubsection" should be the class and "sverige" the id which belongs
> >>> to the class "subsubsection" and which I want to define.
> >>
> >> Then just use #sverige. There is only one element with id 'sverige' on
> >> the page (I hope!), so the class need not be mentioned.
> >
> > I have not checked up, yet whether there is only one "id" or not which
is
> > called "Sverige" but why should it be an error to specify both the class
> > which is the parent and the "id" which is the child?
>
> Because they are names to identify elements. One element with two
> names, is not a child of itself. Is Asero a child of Donatello which
> is a child of Luigi? No, they all refer to the same person.
>
> If you write <div class="foo" id="bar">, you are giving two names to
> one element. This is very much okay, and certainly has its use.
> But you can't say that #bar is a child of .foo, because it's one and
> the same element they refer to.

Why did I get a class error then?


--
Luigi Donatello Asero
https://www.scaiecat-spa-gigi.com/sv/boende-i-italien.php
今天二零零六年二月二十六日
星期日

 

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

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