Skip to content

Commit 67b4e3a

Browse files
committed
float demo done.
1 parent d9dc2f9 commit 67b4e3a

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

days/013-016-css-basics/demos/selectorville/float.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,14 @@
2222
<div>
2323
<div id="top-div">
2424
<img src="static/img/dunecat.jpg" alt="">
25-
<div>This is a message</div>
25+
<div class="msg">This is a message</div>
26+
<div style="clear: both;"></div>
2627
</div>
2728

2829
<div class="page-content">
2930

31+
<p><a href="index.html">&#171; home</a></p>
32+
3033
<p>
3134
Lorem ipsum dolor amet bushwick banh mi irony sustainable twee slow-carb whatever iPhone austin kale chips vegan
3235
meh flannel sartorial crucifix. Lyft ramps biodiesel asymmetrical offal, four dollar toast succulents meggings
@@ -51,7 +54,6 @@
5154
Content via <a href="https://hipsum.co">Hipster Ipsum</a>
5255
</p>
5356

54-
<p><a href="index.html">&#171; home</a></p>
5557

5658
</div>
5759

days/013-016-css-basics/demos/selectorville/static/css/float.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,23 @@ body {
44
padding: 0;
55
}
66

7+
#top-div img {
8+
float: right;
9+
height: 96px;
10+
}
11+
712
#top-div {
813
background-color: #222;
914
color: white;
1015
font-size: 48px;
1116
padding: 10px;
1217
}
1318

19+
#top-div .msg {
20+
margin-top: 12px;
21+
margin-left: 10px;
22+
}
23+
1424
a {
1525
font-weight: bold;
1626
}

0 commit comments

Comments
 (0)