css affect all child elements

Solutions on MaxInterview for css affect all child elements by the best coders in the world

showing results for - "css affect all child elements"
Rico
19 Jul 2016
1.wrapper * {
2    color: blue;
3    margin: 0 100px; /* Only for demo */
4}
5.myTestClass > * {
6    color:red;
7    margin: 0 20px;
8}
Serena
27 Jul 2017
1div.class, div.class > * {
2    // CSS Property
3}
Greta
05 May 2018
1//Will select all li under ul
2//<ul>
3	<li>
4		<ul>
5			<li></li>
6			<li></li>
7		</ul>
8	</li>
9</ul>
10Affected li = 4
11ul li { margin: 0 0 5px 0; }
12
13//Will only select the childer li of the ul
14//<ul>
15	<li>
16		<ul>
17			<li></li>
18			<li></li>
19		</ul>
20	</li>
21</ul>
22Affected li = 1
23ul > li { margin: 0 0 5px 0; }
similar questions
queries leading to this page
css affect all child elements