You are here: Re: difference between css declarations « HTML « IT news, forums, messages
Re: difference between css declarations

Posted by Benjamin Niemann on 11/12/22 11:24

ppcguy wrote:

> i've got
>
> * html #menu
> {
> }
>
> and
>
> #menu span
> {
> }
>
>
> <body>
> <span id="menu">
> </span>
> </body>
>
> is there a difference between the two css declarations.
>
> i would think they're the same...but if i move the contents
> from one to another i get different results.

'#menu span' refers to a span inside an element with id="menu", e.g.
<div id="menu"><span>..</span></div>

What you probably want is 'span#menu'.
Then both rules would match your <span> but with different priorities, so
they are are not 'the same'.


--
Benjamin Niemann
Email: pink at odahoda dot de
WWW: http://www.odahoda.de/

 

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

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