I have found this as part of a navigation script.
[code=php]
ul.nav,
.nav ul { …. margin & list-style-type setting … }
ul.nav { … width setting … }
ul.nav>li { … margin & padding setting … }
ul.nav li>ul { … sub-list item settings of width, margin, left, display …}
ul.nav li:hover>ul { … display change … }
nav ul li a { … display changes without hover …}
ul.nav,
.nav ul,
nav ul li a { … color settings only … }
ul.nav li:hover { … color settings only … }
ul { border settings … }
.nav a { … text decoration … }
My question is how does the syntax differ in results?
For example
ul.nav,
.nav ul {
looks like both control the same thing (?)
All <UL> with a ‘class=nav”
and
All ‘class=nav’ with <UL> tags are given a paritcular look when rendered.
Is there a purpose for the “duplicated” syntax, or is this just good practice?
Later into the style there is a:
ul.nav>li {
and
ul.nav li>ul {
What does the ‘>’ do in this context and is is different from:
ul.nav li {
and
ul.nav li ul {
The style sheet works well but I just don’t understand the syntax differences
and my references do not dwell on this.
Thanks for any insight. ?