Hi,
I have a structer like this:
<div class="node">
<a><img /></a>
<div class="child">
<a><img /></a>
</div>
<div class="child">
<a><img /></a>
</div>
</div>
I want both childs to be indented to the parent element( in my case the
div elemnen with class="node"). I wrote in my css file something like that.
.child{
position:absolute;
left:80px;
}
Both childs are indented but also overlapped!!. I can not belive that
there is no possibily of indent multiple children without overlapping.
Can anybody help me?
Kris - 29 Oct 2003 21:12 GMT
> <div class="node">
> <a><img /></a>
[quoted text clipped - 17 lines]
> there is no possibily of indent multiple children without overlapping.
> Can anybody help me?
.node { padding-left: 80px; }
or,
.child { margin-left: 80px; }
Oh, the blessings of margins and paddings. Without them we would still
be coding like it were 1998. One wonders why so many still do.

Signature
Kris
kristiaan@xs4all.netherlands (nl)
Owen Jacobson - 29 Oct 2003 21:47 GMT
> Hi,
> I have a structer like this:
[quoted text clipped - 12 lines]
> the div elemnen with class="node"). I wrote in my css file something
> like that.
.child {
margin-left: 2em;
}
Don't use positioning if you don't have to; you'll run into fewer
browser bugs that way.