Abstract

This chapter discusses design patterns that put horizontal and vertical space around inline elements, which may contain text, images, objects, controls, and so on. This chapter contains the following design patterns: Spacing shows how to space text and content. It simply groups together the many properties built into CSS that put space around and between blocks, text, and content. Blocked shows how to render an inline element as a block element. This is a very important design pattern that is often combined with other patterns. Nowrap shows how to prevent the browser from wrapping text across lines. Preserved shows how to render whitespace in a document instead of collapsing it. Code shows how to mark up computer code, render it inline, display it as a block, preserve whitespace, and prevent it from being wrapped across lines. Padded Content shows how to put space around inline content to emphasize it. Inline Spacer shows how to insert a horizontal spacer into a line to put a precise amount of distance between content. Inline Decoration shows how to insert a decoration into a line. A decoration is style— not content. It lets you insert a colored background, a textured background, or a background image into the flow You can put borders around it. You can use it to push content apart, to overlap prior content, and to underlap following content. Linebreak shows how to insert four different types of linebreaks into your document that can add extra space between lines or shrink the distance between lines. Inline Horizontal Rule shows how to insert a horizontal rule using an inline element. You can style the horizontal rule with images, borders, margins, and so on. This allows you to put extra space between lines, to overlap prior lines, and to underlap following lines. An inline horizontal rule is particularly useful because you can use an inline element anywhere. HTML’s horizontal rule is a block element and has limited styling options. KeywordsDesign PatternBackground ImageVertical SpaceBlock ElementExtra SpaceThese keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.