Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Challenge-3 attempt
  • Loading branch information
Ronan committed Feb 5, 2025
commit 9f56d8a0c5fc2c639cbf26f81f5a1fc53ebce710
3 changes: 3 additions & 0 deletions starter/03-CSS-Fundamentals/challenge-3/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"editor.formatOnSave": true
}
52 changes: 28 additions & 24 deletions starter/03-CSS-Fundamentals/challenge-3/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,35 @@
<html>
<head>
<title>Challenge 3</title>
<link rel="stylesheet" href="styles.css">
<link rel="stylesheet" href="styles.css" />
</head>
<body>
<article>
<h2>Converse Chuck Taylor All Star Low Top</h2>
<img
src="img/challenges.jpg"
alt="Chuck Taylor All Star Shoe"
width="250"
height="250"
/>
<p class="price"><strong>$65.00</strong></p>
<p class="shipping">Free shipping</p>
<p>
Ready to dress up or down, these classic canvas Chucks are an everyday
wardrobe staple.
</p>
<p><a class="more-info" href="#">More information &rarr;</a></p>
<h3 class="details-title">Product details</h3>
<ul class="details-list">
<li>Lightweight, durable canvas sneaker</li>
<li>Lightly padded footbed for added comfort</li>
<li>Iconic Chuck Taylor ankle patch</li>
</ul>
<button class="add-to-cart">Add to cart</button>
</article>
<div class="container">
<article>
<h2 class="heading">Converse Chuck Taylor All Star Low Top</h2>
<img
src="img/challenges.jpg"
alt="Chuck Taylor All Star Shoe"
width="250"
height="250"
/>
<p class="price"><strong>$65.00</strong></p>
<p class="shipping">Free shipping</p>
<p>
Ready to dress up or down, these classic canvas Chucks are an everyday
wardrobe staple.
</p>
<p class="more-info-container">
<a class="more-info" href="#">More information &rarr;</a>
</p>
<h3 class="details-title">Product details</h3>
<ul class="details-list">
<li>Lightweight, durable canvas sneaker</li>
<li>Lightly padded footbed for added comfort</li>
<li>Iconic Chuck Taylor ankle patch</li>
</ul>
<button class="add-to-cart">Add to cart</button>
</article>
</div>
</body>
</html>
85 changes: 59 additions & 26 deletions starter/03-CSS-Fundamentals/challenge-3/styles.css
Original file line number Diff line number Diff line change
@@ -1,59 +1,92 @@
* {
margin: 0;
padding: 0;
}

body {
font-family: sans-serif;
font-size: 14px;
font-family: sans-serif;
font-size: 14px;
}

.container {
width: 825px;
margin: 0 auto;
}

article {
border: 5px solid black;
border: 5px solid black;
}

h2 {
text-align: center;
background-color: #eee;
.heading {
text-align: center;
background-color: #eee;
padding: 15px 0;
text-transform: uppercase;
}

p {
margin-bottom: 10px;
}

.price {
font-size: 20px;
font-size: 20px;
margin-bottom: 5px;
}

.shipping {
text-transform: uppercase;
color: #aaa;
font-size: 12px;
font-weight: bold;
text-transform: uppercase;
color: #aaa;
font-size: 12px;
font-weight: bold;
margin-bottom: 20px;
}

.more-info:link, .more-info:visited {
color: black;
.more-info:link,
.more-info:visited {
color: black;
display: block;
margin-bottom: 30px;
}

.more-info:hover, .more-info:active {
text-decoration: none;
.more-info:hover,
.more-info:active {
text-decoration: none;
}

/* Product Details */

.details-title {
text-transform: uppercase;
font-size: 16px;
text-transform: uppercase;
font-size: 16px;
margin-bottom: 20px;
}

.details-list {
list-style-type:square;
list-style-type: square;
margin-left: 20px;
}

li {
margin-bottom: 10px;
}
/* Button */

.add-to-cart {
border: none;
background-color: black;
color: white;
font-size: 20px;
text-transform: uppercase;
cursor: pointer;
border: none;
background-color: black;
color: white;
font-size: 20px;
text-transform: uppercase;
cursor: pointer;
display: block;
width: 100%;
padding-top: 15px;
padding-bottom: 10px;
}

.add-to-cart:hover {
background-color: white;
color: black;
background-color: white;
color: black;
border-top: 5px solid black;
padding: 10px 0;
}