Skip to content

Commit 4f2c42d

Browse files
author
Ronan
committed
Challenge 2
1 parent bb29f5b commit 4f2c42d

File tree

2 files changed

+26
-10
lines changed

2 files changed

+26
-10
lines changed

starter/04-CSS-Layouts/challenge-2/index.html

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<body>
88
<article class="product">
99
<h2 class="product-title">Converse Chuck Taylor All Star Low Top</h2>
10-
<div class="container clearfix">
10+
<div class="container">
1111
<img
1212
src="img/challenges.jpg"
1313
alt="Chuck Taylor All Star Shoe"
@@ -16,8 +16,10 @@ <h2 class="product-title">Converse Chuck Taylor All Star Low Top</h2>
1616
class="product-img"
1717
/>
1818
<div class="product-info">
19-
<p class="price"><strong>$65.00</strong></p>
20-
<p class="shipping">Free shipping</p>
19+
<div class="product-info-header">
20+
<p class="price"><strong>$65.00</strong></p>
21+
<p class="shipping">Free shipping</p>
22+
</div>
2123
<p class="sale">sale</p>
2224
<p class="product-description">
2325
Ready to dress up or down, these classic canvas Chucks are an

starter/04-CSS-Layouts/challenge-2/styles.css

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ body {
1818

1919
.container {
2020
/* background-color: red; */
21+
display: flex;
22+
gap: 40px;
23+
/* align-items: center; */
2124
}
2225

2326
.sale {
@@ -58,14 +61,20 @@ p {
5861

5962
.product-info {
6063
/* margin-right: 40px; */
61-
/* margin-top: 20px; */
64+
margin-top: 20px;
6265
/* width: 243px; */
6366
/* float: left; */
6467
}
6568

69+
.product-info-header {
70+
display: flex;
71+
align-items: center;
72+
justify-content: space-between;
73+
}
74+
6675
.price {
6776
font-size: 20px;
68-
margin-bottom: 5px;
77+
/* margin-bottom: 5px; */
6978
/* float: left; */
7079
}
7180

@@ -74,9 +83,9 @@ p {
7483
color: #777;
7584
font-size: 12px;
7685
font-weight: bold;
77-
margin-top: 4px;
86+
/* margin-top: 4px;
7887
margin-bottom: 20px;
79-
margin-left: 20px;
88+
margin-left: 20px; */
8089
/* float: right; */
8190
}
8291

@@ -96,15 +105,20 @@ p {
96105
text-decoration: none;
97106
}
98107

108+
.colors {
109+
display: flex;
110+
gap: 10px;
111+
}
112+
99113
.color {
100114
width: 20px;
101115
height: 20px;
102116
/* display: inline-block; */
103-
margin: 0 5px;
117+
/* margin: 0 5px; */
104118
}
105119

106120
.color:first-child {
107-
margin-left: 0;
121+
/* margin-left: 0; */
108122
background-color: rgb(66, 66, 66);
109123
}
110124

@@ -132,7 +146,7 @@ p {
132146
/* PRODUCT DETAILS */
133147

134148
.product-details {
135-
/* width: 243px; */
149+
flex: 0 0 215px;
136150
/* float: left; */
137151
margin-top: 20px;
138152
}

0 commit comments

Comments
 (0)