Summary

In this chapter, we went over the traditional use of floating elements: flowing text around images. We then looked at using floats to build a multi-column layout. Finally, we learned how to tackle the problems that come with using floats. We found that the clearfix hack is the best method for fixing collapsed floats. In the next chapter, we're going to expand on modular CSS as we create modern buttons using a modular approach.

Get Mastering CSS now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.