Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Shorten the comma separated CSS selectors

Maybe the title of this question is ambiguous, what I really mean is:

#footer_list li a:link, #footer_list li a:visited
{
    blah balh blah
}

Is there a shortcut for the two elements in CSS? so the CSS selectors can be shortened

like image 388
Michael Mao Avatar asked Sep 04 '10 05:09

Michael Mao


1 Answers

Sure. If you give them each their own respective class/id names. But thats unnecessary. The code you have is perfectly acceptable, as CSS is Cascading Style Sheets, the rules cascade down essentially.

like image 55
Russell Dias Avatar answered Oct 06 '22 10:10

Russell Dias