Skip to content

Commit 3a593c3

Browse files
committed
Added dimensions for the main header and post image elements, using both pixels and percentages.
1 parent 57f02e2 commit 3a593c3

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

starter/03-CSS-Fundamentals/index.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ <h2>The Basic Language of the Web: HTML</h2>
3737
alt="Headshot of Laura Jones"
3838
height="50"
3939
width="50"
40+
class="author-image"
4041
/>
4142

4243
<!-- using ids is not a good practice -->
@@ -50,6 +51,7 @@ <h2>The Basic Language of the Web: HTML</h2>
5051
alt="HTML code on a screen"
5152
width="500"
5253
height="200"
54+
class="post-image"
5355
/>
5456
</header>
5557

starter/03-CSS-Fundamentals/style.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ body {
1818
padding-right: 40px; */
1919
padding: 20px 40px;
2020
margin-bottom: 60px;
21+
height: 80px;
2122
}
2223

2324
/* Inheritance example */
@@ -38,6 +39,7 @@ aside {
3839
border-top: 5px solid #1098ad;
3940
border-bottom: 5px solid #1098ad;
4041
padding: 50px 0;
42+
width: 500px;
4143
}
4244

4345
h1,
@@ -178,6 +180,12 @@ a:active {
178180
font-style: italic;
179181
}
180182

183+
/* Image styling */
184+
.post-image {
185+
width: 100%;
186+
height: auto;
187+
}
188+
181189
/* Resolving conflicts */
182190
#copyright {
183191
color: yellow;

0 commit comments

Comments
 (0)