Although some aspects of the CSS formatting model may seem counterintuitive at first, they begin to make sense as you work with them more. In many cases, rules that initially seem nonsensical or even idiotic turn out to prevent bizarre or otherwise undesirable document displays. Block-level elements are in many ways easy to understand, and affecting their layout is typically a simple task. Inline elements, on the other hand, can be tricky to manage, as a number of factors come into playnot least of which is whether the element is replaced or nonreplaced. Now that we've established the underpinnings of document layout, let's turn our attention to how the various layout properties are used. This effort will span several chapters, and we'll start with the most common box properties: padding, borders, and margins.