HTML and CSS Reference
In-Depth Information
Once you find one, change it into a
div
. Then set the
margin-left
and
margin-right
properties on the
div
.
Forty pixels is a common value that many browsers use for blockquote indentation, so this rule would reproduce
that:
<div style="margin-left: 40px; margin-right: 40px; ">
Of course, you could take this opportunity to choose a different size if you like, and you probably should place
the style rule in an external stylesheet to allow for easier updates later.
If you like, you can also play with the
text-indent
property, which indents just the first line. Negative values
create hanging indents. However, this is very different from the both-sides indentation that you get with a
blockquote or a list.
Search WWH ::
Custom Search