O'Reilly logo

Microsoft® HTML5 Step by Step by Faithe Wempen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Positioning Divisions

There are two ways of positioning a division (or equivalent semantic-tagged block): you can use the float style rule, as you did with pictures in Chapter 9, or you can use the position style rule. The following sections explain each of these methods.

Note

In the rest of this chapter, for simplicity, I use the term division generically to mean both the <div> tag and the HTML5 semantic tags. In most cases, browsers handle the formatting and positioning the same way.

Floating a Division to the Right or Left

The easiest way to place one division beside another is to use the float style rule. For example, to make a navigation bar that floats to the left of the main body text, you can set the navigation bar’s division to a certain ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required