Chapter 6

Using Alternative Positioning

IN THIS CHAPTER

check Setting position to absolute

check Managing z-index

check Creating fixed and flexible layouts

check Working with fixed and relative positioning

check Using the new flexbox model

“The absence of alternatives clears the mind marvelously.”

— HENRY A. KISSINGER

Floating layouts (described in Book 3, Chapter 5) are the preferred way to set up page layouts today, but sometimes other alternatives are useful. You can use absolute, relative, or fixed positioning techniques to put all your page elements exactly where you want them. Well, almost exactly. It's still web development, where nothing's exact. Because none of these alternatives are completely satisfying, the W3C (web standards body) has introduced a very promising new layout model called the flexbox model.

The techniques described in this chapter will give you even more capabilities when it comes to setting up great-looking websites.

Working with Absolute Positioning

Begin by considering the default ...

Get Coding All-in-One For Dummies now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.