HTML5, CSS3, and JavaScript Fourth Edition

(Ben Green) #1

CHAPTER 12. BOX MODEL 137


can float an image left or right, and flow the following content around that
image like a rock in a stream of water.


Exam Question 246(p.350): List the two “float:” options.
Required Answer:left, right


As you float things, they will go left or right as far as they can, and as
high on the webpage as they can. If you float lots of things, it may not
look natural, as they might leave lots of empty space below the outermost
objects.


Exam Question 247(p.350): List the three “clear:” options.
Required Answer:left, right, both


Clear cancels out the floating that is pending and forces the following items
to appear below all that were above. You can clear left, clear right, or clear
both.


12.7 For Further Study


http://www.w3.org/TR/css3-values/is intended to officially list and de-
fine things like px, pt, in, mm, and more.


http://www.w3schools.com/css/css_boxmodel.aspexplains more about
the box model in general.


http://www.w3schools.com/css/css_border.aspexplains more about bor-
ders.


http://www.w3schools.com/css/css_margin.aspexplains more about mar-
gins.

Free download pdf