473,320 Members | 1,876 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

relative position of childs elements.

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>

In the begining of my presentation i have display="none" for both
childs. Then using a javascript i make display="block". 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;
display:none;
}

When i make both visible they are indented to the parent but also they
are overlapped. And i do not want any overlap situation. Can anybody
help me?

Jul 20 '05 #1
2 1845
*Sergio del Amo Caballero* <se***@sbox.tugraz.at>:

<div class="node">
<a><img /></a>
<div class="child"><a><img /></a></div>
<div class="child"><a><img /></a></div>
</div>

In the begining of my presentation i have display="none" for both
childs. Then using a javascript i make display="block".
Is it really wanted that people without JS but with CSS don't have access to
the second and third link at all? Maybe you better keep their display as is
in the CSS and only fiddle with it in the JS part.
I want both childs to be indented to the parent element
margin-left: 80px;
.child{position:absolute; left:80px;}

When i make both visible they are indented to the parent but also they
are overlapped.


Of course they are, you gave them the exact same position.

--
"Try to learn something about everything and everything about something."
Thomas H. Huxley
Jul 20 '05 #2
Christoph Paeper wrote:
*Sergio del Amo Caballero* <se***@sbox.tugraz.at>:
<div class="node">
<a><img /></a>
<div class="child"><a><img /></a></div>
<div class="child"><a><img /></a></div>
</div>

In the begining of my presentation i have display="none" for both
childs. Then using a javascript i make display="block".

Is it really wanted that people without JS but with CSS don't have access to
the second and third link at all? Maybe you better keep their display as is
in the CSS and only fiddle with it in the JS part.


Sorry i did not understand what you mean. You told me that with css all
the child are going to be intended to the parent but overlapped. So the
atributte (position:absolute) is only useful when we have only one child
because if we have more we will have all of them overlapped. Is there
anyway to avoid this overlapping with css or i should try to solved it
with javascript?.
Thanks for your feedback

--
Sergio

Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Ken Kast | last post by:
Here's my situation. I have a statically positioned table that has an image in a cell. I also have some layers, defined by absolute-positioned DIVs for some animation. Everything works until I...
3
by: Markus Ernst | last post by:
Hello Reading the follwing document: http://www.w3.org/TR/WD-positioning-970131#In-flow it seems very clear that position:relative should be relative to the parent element. So in the following...
6
by: Gérard Talbot | last post by:
Hello fellow stylers, When trying this page http://www.gtalbot.org/BrowserBugsSection/PercentualRelativePositioning.html I get different rendered layouts with IE 6, IE 7 beta 2, Firefox...
10
by: Mark | last post by:
According to my book on CSS, if you apply 'position: relative' to a block-level element, it will stay exactly where it is. However, you can then use top, left etc. to offset the element relative to...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.