Skip to content

Commit 32b4566

Browse files
committed
Finished section 3
1 parent 20b8d39 commit 32b4566

File tree

4 files changed

+203
-56
lines changed

4 files changed

+203
-56
lines changed

starter/02-HTML-Fundamentals/blog.css

Lines changed: 75 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,15 @@ html {
33
width: 100%;
44
background-color: rgba(255, 255, 255, 0.715);
55
}
6+
body {
7+
max-width: 80%;
8+
margin: 0 auto;
9+
}
610
h2,
711
h3,
812
h4 {
913
color: #1098ad;
14+
margin: 25px 0;
1015
font-family: "Courier New", Courier, monospace;
1116
}
1217
p,
@@ -42,11 +47,9 @@ p {
4247

4348
a {
4449
text-decoration: none;
45-
color: #1098ad;
4650
}
4751

4852
a:hover {
49-
text-decoration: underline;
5053
font-weight: 500;
5154
}
5255

@@ -60,7 +63,19 @@ a:active {
6063
}
6164

6265
article {
63-
border-bottom: 1px solid rgba(96, 96, 96, 0.149);
66+
border-bottom: 1px solid #1098ad4e;
67+
}
68+
69+
#page_title {
70+
margin: 15px;
71+
}
72+
73+
#page_title::first-letter {
74+
font-style: normal;
75+
}
76+
77+
#post_header {
78+
position: relative;
6479
}
6580

6681
#post_title {
@@ -72,10 +87,20 @@ article {
7287
display: flex;
7388
flex-wrap: wrap;
7489
justify-content: center;
90+
margin: 15px 0;
7591
}
7692
.main_nav a {
7793
padding: 0 5px;
7894
font-size: 20px;
95+
border-left: 1px solid lightgray;
96+
border-top: 1px solid lightgray;
97+
box-shadow: 1px 5px 5px slategray;
98+
background-color: coral;
99+
color: white;
100+
}
101+
102+
.main_nav a:hover {
103+
text-decoration: underlinee;
79104
}
80105
#post_data {
81106
font-style: italic;
@@ -87,20 +112,66 @@ article {
87112
}
88113

89114
.thumbnail {
115+
border-radius: 25%;
90116
width: 75px;
91117
height: 75px;
92118
}
93119

120+
#related_post_section {
121+
display: flex;
122+
flex-flow: column nowrap;
123+
align-items: center;
124+
}
125+
94126
#related_posts {
95127
list-style: none;
128+
width: 80%;
129+
min-width: 300px;
130+
max-width: 900px;
131+
padding: 0;
132+
margin: 0;
96133
}
97134
.post_card {
98135
display: flex;
136+
width: 100%;
137+
margin: 15px 0;
138+
border: 1px outset lightgray;
139+
border-radius: 5px;
140+
box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.425);
141+
}
142+
.post_card .thumbnail {
143+
border-radius: 5px 0 0 5px;
144+
}
145+
.post_card:hover {
146+
border: 1px inset #1098ad;
147+
box-shadow: 1px 1px 3px #1098ad;
148+
}
149+
150+
.post_card div {
151+
display: flex;
152+
flex-flow: column nowrap;
153+
justify-content: space-between;
154+
margin-left: 15px;
99155
}
100156

101157
.post_card p {
102158
margin: 0;
103-
padding: 0;
159+
padding: 5px;
160+
}
161+
162+
.author {
163+
font-size: 12px;
164+
}
165+
166+
#like_btn {
167+
position: absolute;
168+
bottom: 50px;
169+
right: 5px;
170+
padding: 10px 15px;
171+
font-size: 22px;
172+
border-radius: 5px;
173+
cursor: pointer;
174+
background-color: rgba(255, 255, 255, 0.715);
104175
}
105176

106177
#copyright {

starter/02-HTML-Fundamentals/challange.css

Lines changed: 79 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,16 @@ html {
1010
}
1111

1212
body {
13-
padding: 15px;
13+
width: 80%;
14+
max-width: 1200px;
15+
margin: 50px auto;
16+
border: 5px solid black;
1417
}
18+
1519
p {
1620
line-height: 1.5;
1721
}
1822
li {
19-
list-style-type: none;
2023
padding: 3px;
2124
}
2225

@@ -35,7 +38,20 @@ a:active {
3538
}
3639

3740
#product_header {
38-
margin: 15px 0;
41+
position: relative;
42+
background-color: rgba(227, 227, 227, 0.533);
43+
padding: 15px 0;
44+
}
45+
46+
#sale-tag {
47+
position: absolute;
48+
top: -20px;
49+
left: -35px;
50+
background-color: rgb(162, 5, 5);
51+
color: white;
52+
text-align: center;
53+
padding: 5px 15px;
54+
box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.589);
3955
}
4056

4157
#product_name {
@@ -46,53 +62,98 @@ a:active {
4662
}
4763

4864
.product_display {
49-
margin: 0 auto;
5065
display: flex;
5166
flex-direction: column;
52-
align-items: center;
67+
align-items: flex-start;
5368
max-width: 800px;
54-
padding: 15px 0;
5569
}
5670
#display_info {
5771
height: 100%;
5872
width: 100%;
5973
display: flex;
6074
flex-flow: column nowrap;
6175
align-self: flex-start;
62-
margin: 15px 0;
6376
}
6477

6578
#display_info .link {
66-
align-self: center;
67-
padding-top: 15px;
79+
color: black;
80+
padding-top: 10px;
81+
text-decoration: underline;
6882
}
6983

7084
#product_img {
71-
width: 100%;
85+
width: 25%;
7286
max-width: 800px;
7387
}
88+
89+
#price-card {
90+
margin-bottom: 15px;
91+
}
92+
93+
#price {
94+
font-weight: bolder;
95+
}
96+
97+
#price-details {
98+
color: rgb(121, 121, 121);
99+
font-size: 8px;
100+
font-weight: bold;
101+
text-transform: uppercase;
102+
}
103+
104+
#color-swatch {
105+
margin: 15px 0;
106+
width: 50%;
107+
display: flex;
108+
gap: 5px;
109+
}
110+
111+
#color-swatch span {
112+
padding: 8px;
113+
border: 1px inset rgba(0, 0, 0, 0.434);
114+
box-shadow: -1px -1px 5px rgba(0, 0, 0, 0.301);
115+
}
116+
117+
#black {
118+
background-color: black;
119+
}
120+
#blue {
121+
background-color: blue;
122+
}
123+
#red {
124+
background-color: red;
125+
}
126+
#yellow {
127+
background-color: yellow;
128+
}
129+
#green {
130+
background-color: green;
131+
}
132+
#brown {
133+
background-color: brown;
134+
}
135+
74136
#product_details {
75137
display: flex;
76138
flex-direction: column;
77139
width: 100%;
78140
}
79141

80142
#product_details h2 {
81-
text-align: center;
82143
margin-bottom: 20px;
83-
border-bottom: 1px dotted rgba(0, 0, 0, 0.463);
144+
}
145+
#product_details ul {
146+
margin: 0 20px;
84147
}
85148

86149
#product_details button {
87-
width: 60%;
150+
width: 100%;
88151
color: aliceblue;
89152
font-weight: 900;
90153
align-self: center;
91154
border: none;
92-
border-radius: 5px;
93-
box-shadow: 3px 3px 5px gray;
94-
background-color: rgb(76, 85, 85);
95-
margin: 25px 0;
96-
padding: 5px 0;
155+
background-color: black;
156+
margin-top: 25px;
157+
padding: 10px 0;
97158
cursor: pointer;
98159
}

starter/02-HTML-Fundamentals/challange.html

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
<body>
1111
<header id="product_header">
1212
<h1 id="product_name">Converse Chuck Taylor All Star Low Top</h1>
13+
<p id="sale-tag">SALE</p>
1314
</header>
1415
<main>
1516
<article>
@@ -20,13 +21,20 @@ <h1 id="product_name">Converse Chuck Taylor All Star Low Top</h1>
2021
alt="Converse shoes"
2122
/>
2223
<div id="display_info">
23-
<p><strong>$65.00</strong></p>
24-
<p>Free Shipping</p>
24+
<div id="price-card">
25+
<p id="price"><strong>$65.00</strong></p>
26+
<p id="price-details">Free Shipping</p>
27+
</div>
2528
<p>
2629
Ready to dress up or down, these classic canvas Chucks are an
2730
everyday wardrobe staple.
2831
</p>
2932
<a class="link" href="#">More information &#8594;</a>
33+
<div id="color-swatch">
34+
<span id="black"></span><span id="blue"></span
35+
><span id="red"></span><span id="yellow"></span
36+
><span id="green"></span><span id="brown"></span>
37+
</div>
3038
</div>
3139
</section>
3240
<section id="product_details">

0 commit comments

Comments
 (0)