This course will be retired on July 12, 2021. We recommend "Mobile-First CSS Layout" for up-to-date content.
Creating a Horizontal Navigation with Floats5:07 with Guil Hernandez
Besides wrapping text around images, you can use floats to create entire web layouts. For example, you can float the links in a navigation, or content columns in a container.
- With floats, we don't have to worry about the the extra whitespace that can appear when using inline or inline-block display.
- Floated elements will sit adjacent to each other regardless of the HTML whitespace between them.
- If a block-level element contains floated elements, its height collapses.
You need to sign up for Treehouse in order to download course files.Sign up