Solution Review: CSS Floats Challenges
The solutions to the challenges based on the CSS float property are discussed in this lesson.
We'll cover the following...
Solution review: Challenge 1
Let’s have a look at the solution first.
Explanation
body {
font: 1.2em / 1.5 Helvetica Neue;
}
The font
shorthand property is used where 1.2em
is the font-size
, 1.5
is the line-height
, and the font-family
is Helvetica Neue
.
* {
box-sizing: border-box;
}
All the elements must have a border-box
around them so that the padding
and border
are included in an element’s total width
...