Completed exercise 03 in another way
Further explanation in README in Solution section Solution similar to exercise 02
This commit is contained in:
		
							parent
							
								
									0cfdc007c7
								
							
						
					
					
						commit
						d031f5ee79
					
				| 
						 | 
				
			
			@ -18,3 +18,7 @@ This will help you further practice adding classes and using class selectors, so
 | 
			
		|||
- Does each element have a unique class name?
 | 
			
		||||
- Did you use the grouping selector for styles that both elements share?
 | 
			
		||||
- Did you make separate rules for the styles unique to each element?
 | 
			
		||||
 | 
			
		||||
# Solution
 | 
			
		||||
 | 
			
		||||
The same as in exercise 02, instead of classes, IDs, element names, I used nth-child and * to point to elements.
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,13 @@
 | 
			
		|||
body > *:nth-child(1) {
 | 
			
		||||
    background-color: black;
 | 
			
		||||
    color: white;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
body > *:nth-child(2) {
 | 
			
		||||
    background-color: yellow;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
body > * {
 | 
			
		||||
    font-size: 28px;
 | 
			
		||||
    font-family: Helvetica, "Times New Roman", sans-serif;
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
		Reference in New Issue