Skip to content

Commit 022345a

Browse files
committed
build layout with float
1 parent 241077c commit 022345a

File tree

2 files changed

+16
-25
lines changed

2 files changed

+16
-25
lines changed

starter/03-CSS-Fundamentals/index.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,7 @@ <h4>Related posts</h4>
149149
</li>
150150
</ul>
151151
</aside>
152-
153-
<footer>Copyright &copy; 2027 by The Code Magazine.</footer>
152+
<footer>Copyright &copy; 2027 by The Code Magazine</footer>
154153
</div>
155154
</body>
156155
</html>

starter/03-CSS-Fundamentals/style.css

Lines changed: 15 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,12 @@
88
body {
99
color: #444;
1010
font-family: sans-serif;
11-
1211
border-top: 10px solid #1098ad;
1312
position: relative;
1413
}
1514

1615
.container {
17-
width: 800px;
16+
width: 1200px;
1817
/* margin-left: auto;
1918
margin-right: auto; */
2019
margin: 0 auto;
@@ -111,14 +110,6 @@ li:last-child {
111110
margin-bottom: 0;
112111
}
113112

114-
/* footer p {
115-
font-size: 16px;
116-
} */
117-
118-
/* article header p {
119-
font-style: italic;
120-
} */
121-
122113
#author {
123114
font-style: italic;
124115
font-size: 18px;
@@ -132,23 +123,10 @@ li:last-child {
132123
font-size: 18px;
133124
font-weight: bold;
134125
}
135-
136-
/* ul {
137-
list-style: none;
138-
} */
139-
140126
.related {
141127
list-style: none;
142128
}
143129

144-
body {
145-
/* background-color: orangered; */
146-
}
147-
148-
/* .first-li {
149-
font-weight: bold;
150-
} */
151-
152130
li:first-child {
153131
font-weight: bold;
154132
}
@@ -288,3 +266,17 @@ nav p {
288266
content: "";
289267
display: block;
290268
}
269+
270+
article {
271+
float: left;
272+
width: 870px;
273+
}
274+
275+
aside {
276+
float: right;
277+
width: 300px;
278+
}
279+
280+
footer {
281+
clear: both;
282+
}

0 commit comments

Comments
 (0)