File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
foundations/02-class-id-selectors/solution Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 3
3
font-family : Verdana, "DejaVu Sans" , sans-serif;
4
4
}
5
5
6
- .oddly-cool {
6
+ .adjust-font-size {
7
7
font-size : 24px ;
8
8
}
9
9
12
12
font-size : 36px ;
13
13
}
14
14
15
+ /*
16
+ In the id selector 'four' below, we could have also
17
+ added a rule to set the font size to 24px.
18
+
19
+ However, since the elements 'Number 3' and 'Number 4'
20
+ in the HTML file share the same font size, we reused
21
+ the 'adjust-font-size' class above to help reduce
22
+ duplicate code.
23
+ */
15
24
# four {
16
25
background-color : hsl (120 , 100% , 75% );
17
- font-size : 24px ;
18
26
font-weight : bold;
19
27
}
Original file line number Diff line number Diff line change 10
10
< body >
11
11
< p class ="odd "> Number 1 - I'm a class!</ p >
12
12
< div id ="two "> Number 2 - I'm one ID.</ div >
13
- < p class ="odd oddly-cool "> Number 3 - I'm a class, but cooler!</ p >
14
- < div id ="four "> Number 4 - I'm another ID.</ div >
13
+ < p class ="odd adjust-font-size "> Number 3 - I'm a class, but cooler!</ p >
14
+ < div id ="four " class =" adjust-font-size " > Number 4 - I'm another ID.</ div >
15
15
< p class ="odd "> Number 5 - I'm a class!</ p >
16
16
</ body >
17
17
</ html >
You can’t perform that action at this time.
0 commit comments