I'm not sure text-indent
is what your're looking for. Just to clarify: text-indent
will indent the first row of the paragraph. Indentation is always on the left side, as long as (text-)direction
is ltr
, otherwise of course on the right side. All following rows will start at the boundaries of the paragraph block.
If you want to "indent" the whole block, you're looking for either margin
or padding
.
Also, you're not giving the floated paragraphs a width, so they will adapt to their contents, which might be the cause of you not seeing any indentation happening.
Edit: An example. Take a look at this in a browser. Then remove the text-indent
to see what happens. As you will notice, it does work as it should, but not as you expect it to. (Or, that is, if I have understood what you're going after.)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<style type="text/css" media="screen">
.col {
border: 1px solid red;
display: inline;
float: left;
text-indent: 5px;
}
.col-left {
}
.col-right {
float: right;
}
</style>
</head>
<body>
<p class="col col-left">Lorem ipsum dolor sit amet</p>
<p class="col col-right">Lorem ipsum dolor sit amet</p>
</body>
</html>