On 27/10/06, Ross Hulford <[EMAIL PROTECTED]> wrote:
>
> I have this.
>
>
> <div id="header"
>
>     <div id="holder">
>
>         <ul id="mylist">
>             <li> item 1</li>
>             <li> item2</li>
>
>         <ul>
>
>         </div>
>
>     </div>
>
>
>
> what is the correct way to change the ul properties without effecting
> other properties.
>
> #header #holder #nav {
> }
>
>
> #header #holder #nav.ul {
> }
>
>
> #nav.ul {
> }
>
> #nav ul {
> }
>
>
> and what (if any). Is the difference between #nav.li and #nav li ?
>
>
> thanks,
>
>
> R.
>

An ID is unique, so adding #header and #holder before #nav (though you have
set the id as #mylist) is more specific, but redundant. I'm not sure what
you mean about not affecting other properties, but doing #nav { } or ul#nav
(assuming the ul's id is nav) is fine.

#nav ul will not work because that is saying "the ul which is a descendant
of the element with id 'nav' ".

#nav.li specifies an element with the id "nav" and the class "li" (it
doesn't point to a li element)

#nav li specifies the li children of an element with the id "nav" (which
would normally be a ul)

Hope this helps,

Rafael
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to