Skip to content

Commit 400dee5

Browse files
committed
feat: add style in challenge#2
1 parent a992abb commit 400dee5

File tree

3 files changed

+59
-8
lines changed

3 files changed

+59
-8
lines changed

starter/02-HTML-Fundamentals/challange#2.html

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,31 @@
55
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
77
<title>Challenge #2</title>
8+
<link rel="stylesheet" href="style.css" />
89
</head>
910
<body>
1011
<article>
11-
<h2>Converse Chuck Taylor All Star Low Top</h2>
12+
<h2 class="product-title">Converse Chuck Taylor All Star Low Top</h2>
1213
<img
1314
src="https://i.ibb.co/Jr7Wh1d/challenges.jpg"
1415
alt="Chuck Taylor All Star Shoe"
1516
height="250"
1617
width="250"
1718
/>
18-
<p><strong>$65.00</strong></p>
19-
<p>Free shipping</p>
19+
<p class="price"><strong>$65.00</strong></p>
20+
<p class="shipping">Free shipping</p>
2021
<p>
2122
Ready to dress up or down, these classic canvas Chucksare an everyday
2223
wardrobe staple
2324
</p>
24-
<a href="#">More information &rarr;</a>
25-
<h3>Product details</h3>
26-
<ul>
25+
<a class="more-info" href="#">More information &rarr;</a>
26+
<h3 class="product-details">Product details</h3>
27+
<ul class="details-list">
2728
<li>Lightweight, durable canvas sneaker</li>
2829
<li>Lightly padded footbed for added comfort</li>
2930
<li>Iconic Chuck Tailor ankle patch</li>
3031
</ul>
31-
<button>Add to cart</button>
32+
<button class="add-cart">Add to cart</button>
3233
</article>
3334
</body>
3435
</html>
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
body {
2+
border: 5px solid black;
3+
font-family: sans-serif;
4+
}
5+
6+
.product-title {
7+
text-align: center;
8+
font-size: 22px;
9+
text-transform: uppercase;
10+
background-color: #f7f7f7;
11+
}
12+
13+
.price {
14+
font-size: 24px;
15+
}
16+
17+
.shipping {
18+
font-size: 12px;
19+
text-transform: uppercase;
20+
font-weight: bold;
21+
color: #777;
22+
}
23+
24+
.more-info:link,
25+
.more-info:visited {
26+
color: black;
27+
}
28+
29+
.product-details {
30+
text-transform: uppercase;
31+
font-size: 16px;
32+
}
33+
34+
.details-list li {
35+
list-style: square;
36+
}
37+
38+
.add-cart {
39+
background-color: #000;
40+
border: none;
41+
color: #fff;
42+
font-size: 20px;
43+
text-transform: uppercase;
44+
cursor: pointer;
45+
}
46+
47+
.add-cart:hover {
48+
color: #000;
49+
background-color: #fff;
50+
}

starter/03-CSS-Fundamentals/style.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ li:last-child {
9898
}
9999

100100
li:nth-child(2) {
101-
/* color: red; */
101+
color: red;
102102
}
103103

104104
a:link {

0 commit comments

Comments
 (0)