On Oct 27, 2006, at 3:17 AM, Ross Hulford wrote:
> what is the correct way to change the ul properties without
> effecting other properties.
I'll assume you meant to use the id "nav" instead of "mylist" on the
ul. Most of what you have here will do it, but it depends on other
circumstances. Follow:
> #header #holder #nav {
> }
This would apply the styles only to the element with the id of "nav"
when that element occurs inside an element with the id of "holder"
which in turn occurs inside an element with the id of "header". If
this were an external file for a complex site, for example, it would
only apply to those pages where nav was inside header and holder, and
would not affect the style of nav elements in pages where that
particular bit of nesting doesn't occur.
> #header #holder #nav.ul {
> }
This would apply like the above, but also only when the "nav" element
had the class "ul" applied to it. I suspect you were looking for:
#header #holder ul#nav
which would also work like the top line, except the "nav" element in
question would also have to be the unordered list tag. It would not
apply, for example, to a paragraph tag inside header and holder.
> #nav.ul {
> }
This would apply to any element with the id "nav" and the class "ul",
Again I suspect you wanted
ul#nav
which would apply to any unordered list with the "nav" id.
> #nav ul {
> }
This would affect any and every unordered list which was inside any
element with a "nav" id.
> and what (if any). Is the difference between #nav.li and #nav li ?
#nav.li affects any element with the id "nav" and the class "li".
#nav li affects any list item inside an element with the "nav" id.
You know, for questions like this, the place to go is the selectORacle:
http://gallery.theopalgroup.com/selectoracle/
which, for example, answers your last question with:
Selector 1: *#nav.li
Selects any element with an id attribute that equals nav and a class
attribute that contains the word li.
Selector 2: *#nav li
Selects any li element that is a descendant of any element with an id
attribute that equals nav.
Have Fun,
Arlen
------------------------------
In God we trust, all others must supply data
______________________________________________________________________
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/