Skip to content

Commit

Permalink
complete challenge jonasschmedtmann#3
Browse files Browse the repository at this point in the history
  • Loading branch information
lnnchau committed May 26, 2023
1 parent 457922f commit e283a3c
Show file tree
Hide file tree
Showing 3 changed files with 111 additions and 2 deletions.
10 changes: 10 additions & 0 deletions starter/03-CSS-Fundamentals/challenge.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
</head>
<body>
<article class="product-info">
<p class="sale">Sale</p>
<h3 class="product-name">Converse Chuck Taylor All Star Low Top</h3>

<img src="img/challenges.jpg" alt="Converse" width="250" height="250" />
Expand All @@ -20,6 +21,15 @@ <h3 class="product-name">Converse Chuck Taylor All Star Low Top</h3>

<a class="more-info" href="#"> More information &RightArrow;</a>

<div class="color-board">
<div class="color-board-item color-black"></div>
<div class="color-board-item color-blue"></div>
<div class="color-board-item color-red"></div>
<div class="color-board-item color-yellow"></div>
<div class="color-board-item color-green"></div>
<div class="color-board-item color-brown"></div>
</div>

<h4 class="product-details-title">Product details</h4>
<ul class="product-details">
<li>Lightweight</li>
Expand Down
62 changes: 61 additions & 1 deletion starter/03-CSS-Fundamentals/challenge.style.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,24 @@ body {
border: 4px solid black;
width: 825px;
margin: 50px auto;
position: relative;
}

.sale {
background-color: red;

color: white;
font-weight: bold;
letter-spacing: 2px;
font-size: 12px;
text-transform: uppercase;

display: inline-block;
padding: 7px 15px;

position: absolute;
top: -17px;
left: -38px;
}

.product-name {
Expand Down Expand Up @@ -40,6 +58,9 @@ body {
.more-info:link,
.more-info:visited {
color: black;

display: inline-block;
margin-bottom: 30px;
}

.more-info:hover,
Expand All @@ -50,7 +71,6 @@ body {
/* PRODUCT DETAILS */
.product-details-title {
text-transform: uppercase;
margin-top: 20px;
margin-bottom: 15px;
}

Expand Down Expand Up @@ -83,3 +103,43 @@ body {
color: black;
/* border: none; */
}

/* COLOR BOARD */
.color-board {
margin-bottom: 30px;
}
.color-board-item {
width: 22px;
height: 22px;

display: inline-block;
margin-right: 10px;
}

.color-board-item:last-child {
margin-right: 0;
}

.color-black {
background-color: black;
}

.color-red {
background-color: #ec2f2f;
}

.color-blue {
background-color: #2f6ee2;
}

.color-yellow {
background-color: #f0bf1e;
}

.color-green {
background-color: #90cc20;
}

.color-brown {
background-color: #885214;
}
41 changes: 40 additions & 1 deletion starter/03-CSS-Fundamentals/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,18 @@ aside {
border-bottom: 5px solid #1098ad;
}

nav {
padding: 10px;
}

nav a:link {
padding-right: 5px;
}

nav a:link:last-child {
padding-right: 0;
}

h1,
h2,
h3 {
Expand All @@ -46,12 +58,34 @@ h3 {
h1 {
font-size: 26px;
text-transform: uppercase;
font-size: italic;
font-style: italic;
}

h1::first-letter {
font-style: normal;
padding-right: 10px;
font-size: 30px;
}

h2 {
font-size: 40px;
margin-bottom: 30px;
position: relative;
}

h2::after {
content: "TOP";
background-color: yellow;

color: #444;
font-size: 20px;

display: inline-block;
padding: 5px;

position: absolute;
top: -20px;
right: -10px;
}

h3 {
Expand All @@ -60,6 +94,11 @@ h3 {
margin-top: 40px;
}

h3 + p::first-letter {
/* first letter of the first paragraph after h3 */
font-size: 40px;
}

h4 {
font-size: 20px;
text-transform: uppercase;
Expand Down

0 comments on commit e283a3c

Please sign in to comment.