css - Apply style to more than one element -


this easy one, can no find right way this. have following style definition:

.main_section nav {     color:#999;     ... } 

so style applies a in nav in .main_section. want extend li elements affected. duplicate code, like:

.main_section nav li {     color:#999;     ... } 

but feels wrong. want unify both style specs one. how can that?

use comma (,) define same style on multiple elements

.main_section nav a,.main_section nav li {     color:#999;     ... } 

Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -