© Mark J. Collins 2017

Mark J.  Collins, Pro HTML5 with CSS, JavaScript, and Multimedia, 10.1007/978-1-4842-2463-2_10

10. Positioning Content

Mark J. Collins

(1)Chesterfield, Virginia, USA

In Chapter 2 I explained the basic box model, and in this chapter I’ll demonstrate how each “box” is positioned relative to the other content on the page. Each HTML element takes up a certain amount of space, which is defined as a rectangle; it has a height and a width. In addition, the padding, border, and margin contributes to the space that must be allocated.

So an HTML document can be thought of a series of boxes. In Chapter 4 I explained the structural elements that define the larger boxes, such as the header, section, and article elements. These define the ...

Get Pro HTML5 with CSS, JavaScript, and Multimedia: Complete Website Development and Best Practices 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.