darius <noone@here.invalid> wrote:
[color=blue]
> I want to do paragraphs with nested indent,[/color]
Are they really paragraphs? It's difficult to imagine why they should be
indented in a nested manner.
[color=blue]
> <p class="indent">
> para1
> <div class="indent">para2
> <div class="indent">para3</div>
> </div>
> </p>[/color]
That's invalid markup, so all bets are off. A <p> element must not
contain a <div> element by HTML syntax. The first <div> tag implicitly
closes an open <p> element.
Here's a "keep it simple" approach, which has the drawback that you need
to compute the amounts of indentation:
HTML:
<p>para 1</p>
<p class="level2">para 2</p>
<p class="level3">para 3</p>
CSS:
p { margin-left: 3em; }
p.level2 { margin-left: 6em; }
p.level3 { margin-left: 9em; }
And here's a "make the CSS simpler at the cost of making the HTML more
complicated" approach:
HTML:
<div class="p-container">
<p>para 1</p>
<div class="p-container">
<p class="level2">para 2</p>
<div class="p-container">
<p class="level3">para 3</p>
</div>
</div>
</div>
CSS:
..p-container { margin-left: 3em; }
[color=blue]
> I could do
>
> li {
> list-style-type: none;
> }
>
> but on non-CSS browsers I'll get lists with bullets, which isn't what
> I want.[/color]
But what is important here? Is it acceptable that there is no indentation
when CSS is off? If not, what is really the logical structure of the
data.
--
Yucca,
http://www.cs.tut.fi/~jkorpela/