Pro HTML5 and CSS3 Design Patterns

(avery) #1

CHAPTER 12 ■ ALIGNING CONTENT


Text Indent


HTML


<h1>Text Indent</h1>

<table><tr><td class="text-indent"><code>text-indent</code>
indents the first line of a terminal block element, such as a paragraph,
division, heading, list item, or this table cell.
</td></tr></table>

<p><span class="text-indent"><code>text-indent</code> does
<em>not</em> work on inline elements, such as this span.</span>
<span class="text-indent inline-block"><code>text-indent</code>
<em>does</em> work on inline-block elements, such as this span.</span></p>

CSS


.text-indent { text-indent:60px; }
.inline-block { display:inline-block; }

/* Nonessential rules are not shown. */
Free download pdf