css - Selector for descendents including the element itself -


i wonder if there easier in order achieve (the selection of descendents plus element itself):

<div id="parent">     <div></div>     <div></div> </div>  #parent, #parent * {     background-color: red; } 

if have existing rule many classes e.g.

.b20120411, .b20120630, .b20120711, .b20121010, .b20130109, .b20121214 {     ...  } 

and have descendents messy:

.b20120411, .b20120411 *, .b20120630, .b20120630 *, .b20120711, .b20120711 *, .b20121010, .b20121010 *, .b20130109, .b20130109 *, .b20121214, .b20121214 * {     ... } 

only:

<div id="grand-parent">     <div id="parent">         <div></div>         <div></div>     </div> </div>   #grand-parent * {     background-color: red; } 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -