Skip to content

Commit e283a3c

Browse files
committed
complete challenge jonasschmedtmann#3
1 parent 457922f commit e283a3c

File tree

3 files changed

+111
-2
lines changed

3 files changed

+111
-2
lines changed

starter/03-CSS-Fundamentals/challenge.html

+10
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
</head>
1010
<body>
1111
<article class="product-info">
12+
<p class="sale">Sale</p>
1213
<h3 class="product-name">Converse Chuck Taylor All Star Low Top</h3>
1314

1415
<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>
2021

2122
<a class="more-info" href="#"> More information &RightArrow;</a>
2223

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+
2333
<h4 class="product-details-title">Product details</h4>
2434
<ul class="product-details">
2535
<li>Lightweight</li>

starter/03-CSS-Fundamentals/challenge.style.css

+61-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,24 @@ body {
1212
border: 4px solid black;
1313
width: 825px;
1414
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;
1533
}
1634

1735
.product-name {
@@ -40,6 +58,9 @@ body {
4058
.more-info:link,
4159
.more-info:visited {
4260
color: black;
61+
62+
display: inline-block;
63+
margin-bottom: 30px;
4364
}
4465

4566
.more-info:hover,
@@ -50,7 +71,6 @@ body {
5071
/* PRODUCT DETAILS */
5172
.product-details-title {
5273
text-transform: uppercase;
53-
margin-top: 20px;
5474
margin-bottom: 15px;
5575
}
5676

@@ -83,3 +103,43 @@ body {
83103
color: black;
84104
/* border: none; */
85105
}
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+
}

starter/03-CSS-Fundamentals/style.css

+40-1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,18 @@ aside {
3737
border-bottom: 5px solid #1098ad;
3838
}
3939

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+
4052
h1,
4153
h2,
4254
h3 {
@@ -46,12 +58,34 @@ h3 {
4658
h1 {
4759
font-size: 26px;
4860
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;
5068
}
5169

5270
h2 {
5371
font-size: 40px;
5472
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;
5589
}
5690

5791
h3 {
@@ -60,6 +94,11 @@ h3 {
6094
margin-top: 40px;
6195
}
6296

97+
h3 + p::first-letter {
98+
/* first letter of the first paragraph after h3 */
99+
font-size: 40px;
100+
}
101+
63102
h4 {
64103
font-size: 20px;
65104
text-transform: uppercase;

0 commit comments

Comments
 (0)