Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / HTML, CSS, Scripts / CSS / October 2003



Tip: Looking for answers? Try searching our database.

ident child

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sergio del Amo Caballero - 29 Oct 2003 20:30 GMT
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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.