File tree Expand file tree Collapse file tree 2 files changed +24
-17
lines changed
starter/02-HTML-Fundamentals Expand file tree Collapse file tree 2 files changed +24
-17
lines changed Original file line number Diff line number Diff line change 9
9
< body >
10
10
< article class ="product ">
11
11
< h2 class ="product-title "> Converse Chuck Taylor All Star Low Top</ h2 >
12
- < div class ="container clearfix ">
12
+ < div class ="container ">
13
13
< img
14
14
src ="img/challenges.jpg "
15
15
all ="Chuck Taylor All Star Low Top "
@@ -19,8 +19,10 @@ <h2 class="product-title">Converse Chuck Taylor All Star Low Top</h2>
19
19
/>
20
20
21
21
< div class ="product-info ">
22
- < p class ="price "> < strong > $65.00</ strong > </ p >
23
- < p class ="shipping "> Free shipping</ p >
22
+ < div class ="product-price ">
23
+ < p class ="price "> < strong > $65.00</ strong > </ p >
24
+ < p class ="shipping "> Free shipping</ p >
25
+ </ div >
24
26
< p class ="sale "> Sale</ p >
25
27
< p class ="product-description ">
26
28
Ready to dress up or down, these classic canvas Chucks are an
@@ -32,7 +34,7 @@ <h2 class="product-title">Converse Chuck Taylor All Star Low Top</h2>
32
34
> More information →</ a
33
35
>
34
36
35
- < div class ="colors ">
37
+ < div class ="product- colors ">
36
38
< div class ="color "> </ div >
37
39
< div class ="color color-blue "> </ div >
38
40
< div class ="color color-red "> </ div >
Original file line number Diff line number Diff line change @@ -16,11 +16,11 @@ body {
16
16
}
17
17
.container {
18
18
/* background-color: red; */
19
+ display : flex;
20
+ gap : 40px ;
19
21
}
20
22
21
23
.product-img {
22
- float : left;
23
- margin-right : 40px ;
24
24
}
25
25
26
26
/* PRODUCT */
@@ -42,10 +42,16 @@ body {
42
42
/* PRODUCT INFOMATION */
43
43
.product-info {
44
44
/* (825 - 8 - 250 - 80) */
45
- width : 243px ;
46
- float : left;
47
- margin-right : 40px ;
45
+ /* width: 243px; */
48
46
margin-top : 20px ;
47
+ flex : 1 ;
48
+ }
49
+
50
+ .product-price {
51
+ display : flex;
52
+ justify-content : space-between;
53
+ align-items : center;
54
+ margin-bottom : 20px ;
49
55
}
50
56
51
57
.price {
58
64
text-transform : uppercase;
59
65
font-weight : bold;
60
66
color : # 777 ;
61
- margin-bottom : 20px ;
62
- float : right;
63
- margin-top : 8px ;
64
67
}
65
68
66
69
.sale {
81
84
left : -38px ;
82
85
}
83
86
.product-description {
84
- clear : both;
85
87
margin-bottom : 10px ;
86
88
}
87
89
.more-info : link ,
@@ -96,12 +98,15 @@ body {
96
98
text-decoration : none;
97
99
}
98
100
101
+ .product-colors {
102
+ display : flex;
103
+ gap : 10px ;
104
+ }
105
+
99
106
.color {
100
107
background-color : # 000 ;
101
108
height : 22px ;
102
109
width : 22px ;
103
- display : inline-block;
104
- margin-right : 10px ;
105
110
}
106
111
107
112
.color-blue {
@@ -126,9 +131,9 @@ body {
126
131
127
132
/* PRODUCT DETAILS */
128
133
.product-details {
129
- width : 243px ;
130
- float : left;
134
+ /* width: 243px; */
131
135
margin-top : 20px ;
136
+ flex : 1 ;
132
137
}
133
138
134
139
.details-title {
You can’t perform that action at this time.
0 commit comments