I saw some CSS the other day with a line like:
#nav ul.root li:hover ul.sub1,
#nav ul.root li.hover ul.sub1 {
display: block;
}
I'm not familiar with the comma between the two identical items in the selector portion. What does the comma do? ThanksIt's just so you can apply the same rules to multiple elements. The following would make it so any element within <h1>, <p>, or <em> would have blue text.<style type="text/css">
/*<![CDATA[*/
h1, p, em {
color: #00f;
}
/*]]>*/
</style>Also note, if you look a little bit closer at that selector they are both not the same.
#nav ul.root li:hover ul.sub1,
#nav ul.root li.hover ul.sub1 {
display: block;
}
I'm not familiar with the comma between the two identical items in the selector portion. What does the comma do? ThanksIt's just so you can apply the same rules to multiple elements. The following would make it so any element within <h1>, <p>, or <em> would have blue text.<style type="text/css">
/*<![CDATA[*/
h1, p, em {
color: #00f;
}
/*]]>*/
</style>Also note, if you look a little bit closer at that selector they are both not the same.