Skip to content

Commit 0989fdf

Browse files
committed
completed float code challenge
1 parent 535ce3e commit 0989fdf

File tree

2 files changed

+56
-45
lines changed

2 files changed

+56
-45
lines changed

projectfolder/css/shopStyle.css

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,13 @@ body {
1212
p {
1313
margin-bottom: 20px;
1414
}
15+
.product-description {
16+
clear: both;
17+
}
1518

1619
.product-container {
1720
border: black 4px solid;
18-
width: 825px;
21+
width: 900px;
1922
margin: 25px auto;
2023
position: relative;
2124
}
@@ -43,17 +46,20 @@ p {
4346
.product-details {
4447
text-transform: uppercase;
4548
margin-bottom: 20px;
49+
font-size: 16px;
4650
}
4751

4852
.shipping {
4953
text-transform: uppercase;
5054
font-weight: bold;
5155
color: #777;
56+
float: right;
5257
}
5358

5459
.price {
5560
font-size: 25px;
5661
margin-bottom: 0px;
62+
float: left;
5763
}
5864

5965
/* Link styling */
@@ -168,20 +174,25 @@ nav {
168174
}
169175

170176
/* Floats */
171-
.product-description-container {
172-
background-color: red;
173-
width: 240px;
174-
height: 250px;
177+
.product-image {
175178
float: left;
179+
margin-right: 40px;
176180
}
177181

178-
.product-info-container {
179-
float: right;
182+
.product-details-container {
183+
/* background-color: yellow; */
184+
width: 243px;
185+
height: 250px;
186+
float: left;
187+
padding: 0px 40px;
188+
/* margin-top: 20px; */
180189
}
181190

182-
.product-details-container {
183-
background-color: yellow;
184-
width: 240px;
191+
.product-info-container {
192+
width: 243px;
193+
/* background-color: blue; */
194+
float: left;
185195
height: 250px;
186-
float: right;
196+
margin-right: 40px;
197+
/* margin-top: 20px; */
187198
}

projectfolder/pages/challenges.html

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -13,43 +13,43 @@
1313
</nav>
1414
<h2 class="product-name">Converse Chuck Taylor All Start Low Top</h2>
1515

16-
<div class="product-layout-container">
17-
<img
18-
src="../imgs/challenges.jpg"
19-
alt="A shoe"
20-
height="250"
21-
width="250"
22-
/>
23-
<div class="product-info-container">
24-
<p class="price"><strong>$65.00</strong></p>
25-
<p class="shipping">Free Shipping</p>
26-
<p>
27-
Ready to dress up or down, these classic convo Chucks are an
28-
everyday wardrobe staple
29-
</p>
30-
<a class="more-info" href="#">
31-
<p>More information &RightArrow;</p></a
32-
>
16+
<img
17+
src="../imgs/challenges.jpg"
18+
alt="A shoe"
19+
height="250"
20+
width="250"
21+
class="product-image"
22+
/>
23+
<div class="product-info-container">
24+
<p class="price"><strong>$65.00</strong></p>
25+
<p class="shipping">Free Shipping</p>
26+
<p class="product-description">
27+
Ready to dress up or down, these classic convo Chucks are an
28+
everyday wardrobe staple
29+
</p>
30+
<a class="more-info" href="#">
31+
<p>More information &RightArrow;</p></a
32+
>
3333

34-
<div class="colored-boxes">
35-
<div class="black"></div>
36-
<div class="blue"></div>
37-
<div class="red"></div>
38-
<div class="yellow"></div>
39-
<div class="green"></div>
40-
<div class="brown"></div>
41-
</div>
42-
</div>
43-
<div class="product-details-container">
44-
<h3 class="product-details">Product Details</h3>
45-
<ul>
46-
<li>Lightweight, durable and painful</li>
47-
<li>Gives crippling back pain with each step</li>
48-
<li>Expensive door stop</li>
49-
<li>Causes depression</li>
50-
</ul>
34+
<div class="colored-boxes">
35+
<div class="black"></div>
36+
<div class="blue"></div>
37+
<div class="red"></div>
38+
<div class="yellow"></div>
39+
<div class="green"></div>
40+
<div class="brown"></div>
5141
</div>
5242
</div>
43+
<div class="product-details-container">
44+
<h3 class="product-details">Product Details</h3>
45+
<ul>
46+
<li>Lightweight, durable and painful</li>
47+
<li>Gives crippling back pain with each step</li>
48+
<li>Expensive door stop</li>
49+
<li>Causes depression</li>
50+
</ul>
51+
</div>
52+
5353
<button>Add to Cart</button>
5454
</article>
5555
</div>

0 commit comments

Comments
 (0)