-
Notifications
You must be signed in to change notification settings - Fork 0
/
challenge3_grid.html
242 lines (219 loc) · 5.42 KB
/
challenge3_grid.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: sans-serif;
line-height: 1.4;
}
/* PRODUCT */
.product {
width: 70%;
margin: 50px auto;
position: relative;
box-sizing: border-box;
border: 2px solid black;
}
.product-title {
text-align: center;
font-size: 22px;
text-transform: uppercase;
background-color: #f7f7f7;
padding: 15px;
}
/* PRODUCT INFORMATION */
.price {
font-size: 24px;
}
.shipping {
font-size: 12px;
text-transform: uppercase;
font-weight: bold;
color: #777;
}
.sale {
background-color: #ec2f2f;
color: #fff;
font-size: 12px;
text-transform: uppercase;
font-weight: bold;
letter-spacing: 2px;
padding: 7px 15px;
display: inline-block;
position: absolute;
top: -17px;
left: -38px;
/* width: 40px;
text-align: center; */
}
.more-info:link,
.more-info:visited {
color: black;
margin-bottom: 30px;
display: inline-block;
margin-top: 30px;
}
.more-info:hover,
.more-info:active {
text-decoration: none;
}
.color {
background-color: #000;
height: 22px;
width: 22px;
display: inline-block;
margin-right: 10px;
}
.color-blue {
background-color: #2f6ee2;
}
.color-red {
background-color: #ec2f2f;
}
.color-yellow {
background-color: #f0bf1e;
}
.color-green {
background-color: #90cc20;
}
.color-brown {
background-color: #885214;
}
/* PRODUCT DETAILS */
.details-title {
text-transform: uppercase;
font-size: 16px;
margin-bottom: 15px;
margin-top: 10px;
}
.details-list {
list-style: square;
margin-left: 20px;
}
.details-list li {
margin-bottom: 10px;
}
/* BUTTON */
.add-cart {
background-color: #000;
border: none;
color: #fff;
font-size: 20px;
text-transform: uppercase;
cursor: pointer;
padding: 15px;
width: 100%;
border-top: 4px solid black;
grid-column: 1/-1;
}
.add-cart:hover {
color: #000;
background-color: #fff;
}
.price_shipping {
display: flex;
justify-content: space-around;
align-items: center;
margin: 10px 0;
}
.product-description {
text-align: justify;
}
.first {
width: 100%;
height: 100%;
}
.main {
display: grid;
grid-template-columns: 4fr 5fr 5fr;
column-gap: 5%;
}
footer {
background: linear-gradient(
90deg,
hsla(333, 100%, 53%, 1) 0%,
hsla(33, 94%, 57%, 1) 100%
);
color: white;
text-align: center;
padding: 10px;
}
@media only screen and (max-width: 1085px) {
.main {
display: grid;
grid-template-columns: 2fr 3fr;
}
.third {
grid-column: 1/-1;
}
.second {
margin-right: 2%;
}
}
@media only screen and (max-width: 575px) {
.main {
display: grid;
grid-template-columns: 1fr;
}
.third {
grid-column: 1/-1;
}
.second {
margin-right: 2%;
}
}
</style>
</head>
<body>
<article class="product">
<h2 class="product-title">Converse Chuck Taylor All Star Low Top</h2>
<div class="main">
<img
src="images/first.jpg"
alt="Chuck Taylor All Star Shoe"
class="first"
/>
<div class="second">
<div class="price_shipping">
<p class="price"><strong>$65.00</strong></p>
<p class="shipping">Free shipping</p>
</div>
<p class="sale">Sale</p>
<p class="product-description">
Ready to dress up or down, these classic canvas Chucks are an
everyday wardrobe staple.
</p>
<a href="https://converse.com" target="_blank" class="more-info"
>More information →</a
>
<div class="colors">
<div class="color"></div>
<div class="color color-blue"></div>
<div class="color color-red"></div>
<div class="color color-yellow"></div>
<div class="color color-green"></div>
<div class="color color-brown"></div>
</div>
</div>
<div class="third">
<h3 class="details-title">Product details</h3>
<ul class="details-list">
<li>Lightweight, durable canvas sneaker</li>
<li>Lightly padded footbed for added comfort</li>
<li>Iconic Chuck Taylor ankle patch.</li>
</ul>
</div>
<button class="add-cart">Add to cart</button>
</div>
</article>
<footer>this is footer</footer>
</body>
</html>