Code: Select all
<p style="text-indent: 0.5in;">One tab</p>
<p style="text-indent: 1in;">Two tabs</p>
P.
Code: Select all
<p style="text-indent: 0.5in;">One tab</p>
<p style="text-indent: 1in;">Two tabs</p>
Code: Select all
div.indent
{
margin-left: 25px;
}
Code: Select all
<div class="indent">
<p>This paragraph is indented 25px</p>
<div class="indent">
<p>This paragraph is indented 50px</p>
<div class="indent">
<p>This paragraph is indented 75px</p>
<img src="#">
<ol>
<li>This list is indented</li>
<li>Another item in the list</li>
</ol>
</div>
</div>
</div>
Aha, I will try that... however, I think I would still need at least two styles for indented code; a style without any indentation, then one with indentation?doc_guy wrote:We have the following style in our style sheet for indenting:
The beauty of this system is that margin-left is cumulative, which means you can nest multiple divs and get multi-level indenting from a single style.Code: Select all
div.indent { margin-left: 25px; }
Code: Select all
p.code {
font-family:monospace;
background-color:gray;
}
div.indent {
margin-left: 20px;
}
Code: Select all
<div class="indent">
<p class="code">My computer code here</p>
<div class="indent">
<p class="code">This is even further indented code</p>
<div class="indent">
<p class="code">This indenting pattern can go on and on and on! As many levels deep as you need to go.</p>
</div>
</div>
</div>