File tree Expand file tree Collapse file tree 2 files changed +24
-19
lines changed
practice/04 - CSS Layouts Expand file tree Collapse file tree 2 files changed +24
-19
lines changed Original file line number Diff line number Diff line change @@ -28,17 +28,13 @@ body {
28
28
/* PRODUCT INFORMATION */
29
29
.price {
30
30
font-size : 24px ;
31
- float : left;
32
31
}
33
32
34
33
.shipping {
35
34
font-size : 12px ;
36
35
text-transform : uppercase;
37
36
font-weight : bold;
38
37
color : # 777 ;
39
- margin-bottom : 20px ;
40
- float : right;
41
- margin-top : 8px ;
42
38
}
43
39
44
40
.sale {
@@ -68,12 +64,15 @@ body {
68
64
text-decoration : none;
69
65
}
70
66
67
+ .product-colors {
68
+ display : flex;
69
+ gap : 10px ;
70
+ }
71
+
71
72
.color {
72
73
background-color : # 000 ;
73
74
height : 22px ;
74
75
width : 22px ;
75
- display : inline-block;
76
- margin-right : 10px ;
77
76
}
78
77
79
78
.color-blue {
@@ -127,28 +126,24 @@ body {
127
126
}
128
127
129
128
.product-description {
130
- clear : both;
131
129
margin-bottom : 10px ;
132
130
}
133
131
134
132
.product-img {
135
133
width : 250px ;
136
- float : left;
137
- margin-right : 40px ;
138
134
}
139
135
140
136
.product-info {
141
137
/* (825 - 8 - 250 - 2 * 40) / 2 */
142
- width : 243px ;
143
- float : left;
144
- margin-right : 40px ;
138
+ /* width: 243px;*/
145
139
margin-top : 20px ;
140
+ flex : 1 ;
146
141
}
147
142
148
143
.product-details {
149
- width : 243px ;
150
- float : left;
144
+ /*width: 243px;*/
151
145
margin-top : 20px ;
146
+ flex : 1 ;
152
147
}
153
148
154
149
.clearfix ::after {
@@ -159,4 +154,13 @@ body {
159
154
160
155
.container {
161
156
/*background-color: #94d82d;*/
157
+ display : flex;
158
+ gap : 40px ;
159
+ }
160
+
161
+ .product-price {
162
+ display : flex;
163
+ align-items : center;
164
+ justify-content : space-between;
165
+ margin-bottom : 20px ;
162
166
}
Original file line number Diff line number Diff line change 11
11
< body >
12
12
< article class ="product ">
13
13
< h2 class ="product-title "> Converse Chuck Taylor All Star Low Top</ h2 >
14
- < div class ="container clearfix ">
14
+ < div class ="container ">
15
15
< img
16
16
alt ="Chuck Taylor All Star Shoe "
17
17
class ="product-img "
@@ -20,18 +20,19 @@ <h2 class="product-title">Converse Chuck Taylor All Star Low Top</h2>
20
20
/>
21
21
22
22
< div class ="product-info ">
23
- < p class ="price "> < strong > $65.00</ strong > </ p >
24
- < p class ="shipping "> Free shipping</ p >
23
+ < div class ="product-price ">
24
+ < p class ="price "> < strong > $65.00</ strong > </ p >
25
+ < p class ="shipping "> Free shipping</ p >
26
+ </ div >
25
27
< p class ="sale "> Sale</ p >
26
28
27
-
28
29
< p class ="product-description ">
29
30
Ready to dress up or down, these classic canvas Chucks are an everyday
30
31
wardrobe staple.
31
32
</ p >
32
33
< a class ="more-info " href ="https://converse.com " target ="_blank "> More information →</ a >
33
34
34
- < div class ="colors ">
35
+ < div class ="product- colors ">
35
36
< div class ="color "> </ div >
36
37
< div class ="color color-blue "> </ div >
37
38
< div class ="color color-red "> </ div >
You can’t perform that action at this time.
0 commit comments