Skip to content

Commit f7e5f89

Browse files
authored
Merge pull request #7 from Aber-Learningforks/lesson2/css
working CSS Challenge 3
2 parents d26f5e6 + 9f21faf commit f7e5f89

File tree

4 files changed

+84
-8
lines changed

4 files changed

+84
-8
lines changed

projectfolder/css/shopStyle.css

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,27 @@ p {
1515
.product-container {
1616
border: black 4px solid;
1717
width: 825px;
18-
margin: 5 0px auto;
18+
margin: 25px auto;
19+
position: relative;
1920
}
20-
2121
.product-name {
2222
background: #f7f7f7;
2323
text-transform: uppercase;
2424
text-align: center;
2525
padding: 20px 0;
2626
}
2727

28+
.product-name::after {
29+
content: 'SALE';
30+
position: absolute;
31+
top: 25px;
32+
left: -25px;
33+
background: red;
34+
color: white;
35+
letter-spacing: 2px;
36+
padding: 5px 5px;
37+
}
38+
2839
.product-details {
2940
text-transform: uppercase;
3041
margin-bottom: 20px;
@@ -105,3 +116,12 @@ nav {
105116
opacity: 0.8;
106117
justify-content: center;
107118
}
119+
120+
.colored-boxes li {
121+
display: block-inline;
122+
}
123+
124+
.black {
125+
background-color: black;
126+
border: solid 5px black;
127+
}

projectfolder/css/style.css

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ body {
88
border-top: 5px solid #1098ad;
99
color: #444;
1010
font-family: sans-serif;
11+
position: relative;
1112
}
1213

1314
.container {
@@ -48,6 +49,8 @@ aside {
4849
width: 500px;
4950
}
5051

52+
/* SMALLER ELEMENTS */
53+
5154
h1,
5255
h2,
5356
h3 {
@@ -62,7 +65,7 @@ h1 {
6265

6366
h2 {
6467
font-size: 40px;
65-
border-bottom: 5px solid #1098ad;
68+
position: relative;
6669
margin-bottom: 30px;
6770
}
6871

@@ -166,6 +169,20 @@ a:active {
166169
font-style: italic;
167170
}
168171

172+
nav a:link {
173+
/* background-color: orangered;
174+
margin: 20px;
175+
padding: 20px;
176+
display: block; */
177+
margin-right: 30px;
178+
margin-top: 10px;
179+
display: inline-block;
180+
}
181+
182+
nav a:link:last-child {
183+
margin-right: 0px;
184+
}
185+
169186
/* Resolving conflicts */
170187
/*
171188
footer p {
@@ -204,3 +221,34 @@ High to Low
204221
width: 100%;
205222
height: auto;
206223
}
224+
225+
button {
226+
font-size: 22px;
227+
padding: 20px;
228+
cursor: pointer;
229+
position: absolute;
230+
bottom: 50px;
231+
right: 50px;
232+
}
233+
234+
h1::first-letter {
235+
font-style: normal;
236+
margin-right: 5px;
237+
}
238+
239+
h3 + p {
240+
/* color: red; */
241+
}
242+
243+
h2::after {
244+
content: 'TOP';
245+
background-color: #ffe70e;
246+
color: black;
247+
font-size: 16px;
248+
font-weight: bold;
249+
display: inline-block;
250+
padding: 5px 10px;
251+
position: absolute;
252+
top: -10px;
253+
right: -25px;
254+
}

projectfolder/index.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,16 @@ <h1>📘 The Code Magazine</h1>
2525
<nav>
2626
<a href="./pages/blog.html">Blog</a>
2727
<a href="./pages/challenges.html">Challenges</a>
28-
<a href="#">Fexbox</a>
28+
<a href="#">Flexbox</a>
2929
<a href="#">CSS Grid </a>
3030
</nav>
31+
<button>❤Like</button>
3132
</header>
3233

3334
<article>
3435
<header class="post-header">
3536
<h2>The Basic Langauge of The Web: HTML</h2>
36-
<img src="./imgs/laura-jones.jpg" src="the person who wrote this" width="50" height="50" />
37+
<img src="./imgs/laura-jones.jpg" alt="the person who wrote this" width="50" height="50" />
3738
<p id="author">Posted by <strong>Laura Jones </strong> on Monday, June 21st 2027</p>
3839
<br />
3940

@@ -88,13 +89,12 @@ <h4><strong>Related Posts</strong></h4>
8889
<a href="#"> How to Learn Web Development</a>
8990
<p class="related-author">By Jonas Schmeltmann</p>
9091
</li>
91-
<br />
92+
9293
<li>
9394
<img src="imgs/related-2.jpg" alt="Unknown Power of CSS" height="50" width="50" />
9495
<a href="#"> The Uknown Power of CSS</a>
9596
<p class="related-author">By Jonas Schmeltmann</p>
9697
</li>
97-
<br />
9898
<li>
9999
<img src="imgs/related-3.jpg" alt="Why Javascript is Awsome" height="50" width="50" />
100100
<a href="#"> Why Javascript is Awsome</a>
@@ -104,7 +104,7 @@ <h4><strong>Related Posts</strong></h4>
104104
</aside>
105105

106106
<footer>
107-
<p id="copyright" class="copyright text">Copyright &copy 2017 by The Code Magazine</p>
107+
<p id="copyright" class="copyright text">Copyright &copy; 2017 by The Code Magazine</p>
108108
</footer>
109109
</div>
110110
</body>

projectfolder/pages/challenges.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@ <h2 class="product-name">Converse Chuck Taylor All Start Low Top</h2>
1818
<p>Ready to dress up or down, these classic convo Chucks are an everyday wardrobe staple</p>
1919
<a class="more-info" href="#"> <p>More information &RightArrow;</p></a>
2020

21+
<ul class="colored-boxes">
22+
<li class="black"><div></div></li>
23+
<li class="blue"></li>
24+
<li class="red"></li>
25+
<li class="yellow"></li>
26+
<li class="green"></li>
27+
<li class="brown"></li>
28+
</ul>
2129
<h3 class="product-details">Product Details</h3>
2230
<ul>
2331
<li>Lightweight, durable and painful</li>

0 commit comments

Comments
 (0)