File tree 3 files changed +111
-2
lines changed
starter/03-CSS-Fundamentals
3 files changed +111
-2
lines changed Original file line number Diff line number Diff line change 9
9
</ head >
10
10
< body >
11
11
< article class ="product-info ">
12
+ < p class ="sale "> Sale</ p >
12
13
< h3 class ="product-name "> Converse Chuck Taylor All Star Low Top</ h3 >
13
14
14
15
< img src ="img/challenges.jpg " alt ="Converse " width ="250 " height ="250 " />
@@ -20,6 +21,15 @@ <h3 class="product-name">Converse Chuck Taylor All Star Low Top</h3>
20
21
21
22
< a class ="more-info " href ="# "> More information →</ a >
22
23
24
+ < div class ="color-board ">
25
+ < div class ="color-board-item color-black "> </ div >
26
+ < div class ="color-board-item color-blue "> </ div >
27
+ < div class ="color-board-item color-red "> </ div >
28
+ < div class ="color-board-item color-yellow "> </ div >
29
+ < div class ="color-board-item color-green "> </ div >
30
+ < div class ="color-board-item color-brown "> </ div >
31
+ </ div >
32
+
23
33
< h4 class ="product-details-title "> Product details</ h4 >
24
34
< ul class ="product-details ">
25
35
< li > Lightweight</ li >
Original file line number Diff line number Diff line change @@ -12,6 +12,24 @@ body {
12
12
border : 4px solid black;
13
13
width : 825px ;
14
14
margin : 50px auto;
15
+ position : relative;
16
+ }
17
+
18
+ .sale {
19
+ background-color : red;
20
+
21
+ color : white;
22
+ font-weight : bold;
23
+ letter-spacing : 2px ;
24
+ font-size : 12px ;
25
+ text-transform : uppercase;
26
+
27
+ display : inline-block;
28
+ padding : 7px 15px ;
29
+
30
+ position : absolute;
31
+ top : -17px ;
32
+ left : -38px ;
15
33
}
16
34
17
35
.product-name {
40
58
.more-info : link ,
41
59
.more-info : visited {
42
60
color : black;
61
+
62
+ display : inline-block;
63
+ margin-bottom : 30px ;
43
64
}
44
65
45
66
.more-info : hover ,
50
71
/* PRODUCT DETAILS */
51
72
.product-details-title {
52
73
text-transform : uppercase;
53
- margin-top : 20px ;
54
74
margin-bottom : 15px ;
55
75
}
56
76
@@ -83,3 +103,43 @@ body {
83
103
color : black;
84
104
/* border: none; */
85
105
}
106
+
107
+ /* COLOR BOARD */
108
+ .color-board {
109
+ margin-bottom : 30px ;
110
+ }
111
+ .color-board-item {
112
+ width : 22px ;
113
+ height : 22px ;
114
+
115
+ display : inline-block;
116
+ margin-right : 10px ;
117
+ }
118
+
119
+ .color-board-item : last-child {
120
+ margin-right : 0 ;
121
+ }
122
+
123
+ .color-black {
124
+ background-color : black;
125
+ }
126
+
127
+ .color-red {
128
+ background-color : # ec2f2f ;
129
+ }
130
+
131
+ .color-blue {
132
+ background-color : # 2f6ee2 ;
133
+ }
134
+
135
+ .color-yellow {
136
+ background-color : # f0bf1e ;
137
+ }
138
+
139
+ .color-green {
140
+ background-color : # 90cc20 ;
141
+ }
142
+
143
+ .color-brown {
144
+ background-color : # 885214 ;
145
+ }
Original file line number Diff line number Diff line change @@ -37,6 +37,18 @@ aside {
37
37
border-bottom : 5px solid # 1098ad ;
38
38
}
39
39
40
+ nav {
41
+ padding : 10px ;
42
+ }
43
+
44
+ nav a : link {
45
+ padding-right : 5px ;
46
+ }
47
+
48
+ nav a : link : last-child {
49
+ padding-right : 0 ;
50
+ }
51
+
40
52
h1 ,
41
53
h2 ,
42
54
h3 {
46
58
h1 {
47
59
font-size : 26px ;
48
60
text-transform : uppercase;
49
- font-size : italic;
61
+ font-style : italic;
62
+ }
63
+
64
+ h1 ::first-letter {
65
+ font-style : normal;
66
+ padding-right : 10px ;
67
+ font-size : 30px ;
50
68
}
51
69
52
70
h2 {
53
71
font-size : 40px ;
54
72
margin-bottom : 30px ;
73
+ position : relative;
74
+ }
75
+
76
+ h2 ::after {
77
+ content : "TOP" ;
78
+ background-color : yellow;
79
+
80
+ color : # 444 ;
81
+ font-size : 20px ;
82
+
83
+ display : inline-block;
84
+ padding : 5px ;
85
+
86
+ position : absolute;
87
+ top : -20px ;
88
+ right : -10px ;
55
89
}
56
90
57
91
h3 {
60
94
margin-top : 40px ;
61
95
}
62
96
97
+ h3 + p ::first-letter {
98
+ /* first letter of the first paragraph after h3 */
99
+ font-size : 40px ;
100
+ }
101
+
63
102
h4 {
64
103
font-size : 20px ;
65
104
text-transform : uppercase;
You can’t perform that action at this time.
0 commit comments