![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
How to position a child outside of the parent with CSS? div id="parent" I am a parent div id="child" I am child (a floating box outside my parent but positioned close to it) /div /div Like: [parent] [[child (outside)]] |
#3
| |||
| |||
|
|
vunet wrote: How to position a child outside of the parent with CSS? div id="parent" I am a parent div id="child" I am child (a floating box outside my parent but positioned close to it) /div /div Like: [parent] [[child (outside)]] #parent { position: relative; ...} #child { position: absolute; ...} -- Take care, Jonathan ------------------- LITTLE WORKS STUDIOhttp://www.LittleWorksStudio.com |
#4
| |||
| |||
|
|
On Mar 28, 3:07 pm, "Jonathan N. Little" <lws4... (AT) central (DOT) net> wrote: vunet wrote: How to position a child outside of the parent with CSS? #parent { position: relative; ...} #child { position: absolute; ...} when I set top and left to some values it seems to be as if "body" is the parent even though I append child to parent. |
#5
| |||
| |||
|
|
vunet wrote: On Mar 28, 3:07 pm, "Jonathan N. Little" <lws4... (AT) central (DOT) net> wrote: vunet wrote: How to position a child outside of the parent with CSS? #parent { position: relative; ...} #child { position: absolute; ...} when I set top and left to some values it seems to be as if "body" is the parent even though I append child to parent. That's why you should post a URL instead of a code snippet. There is obviously more to this than you're telling. -- Berg |
#6
| |||
| |||
|
|
On Mar 28, 4:02 pm, Bergamot <berga... (AT) visi (DOT) com> wrote: vunet wrote: On Mar 28, 3:07 pm, "Jonathan N. Little" <lws4... (AT) central (DOT) net> wrote: vunet wrote: How to position a child outside of the parent with CSS? #parent { position: relative; ...} #child { position: absolute; ...} when I set top and left to some values it seems to be as if "body" is the parent even though I append child to parent. That's why you should post a URL instead of a code snippet. There is obviously more to this than you're telling. -- Berg Sorry I do not have external URL now. I simply want to know how to position any Pop-up Box element next to each cell of my table when user moves mouse over that cell. It's like a balloon effect. But that balloon should pop up right outside the cell. That's all. |
#7
| |||
| |||
|
|
On 2008-03-28, vunet <vunet... (AT) gmail (DOT) com> wrote: On Mar 28, 4:02 pm, Bergamot <berga... (AT) visi (DOT) com> wrote: vunet wrote: On Mar 28, 3:07 pm, "Jonathan N. Little" <lws4... (AT) central (DOT) net> wrote: vunet wrote: How to position a child outside of the parent with CSS? #parent { position: relative; ...} #child { position: absolute; ...} when I set top and left to some values it seems to be as if "body" is the parent even though I append child to parent. That's why you should post a URL instead of a code snippet. There is obviously more to this than you're telling. -- Berg Sorry I do not have external URL now. I simply want to know how to position any Pop-up Box element next to each cell of my table when user moves mouse over that cell. It's like a balloon effect. But that balloon should pop up right outside the cell. That's all. You should have said it was a table-cell in the first place-- your example was a div, which is normally display: block. Firefox doesn't allow table cells to be containers for positioned descendents. That's why it doesn't work. Firefox is just about within the spec as it says the effect of position: relative on table cells is undefined (although I think it really means the effect of trying to offset them, not the side-effect of being a container for positioned descendents). You can put a div inside the table cell and make the div position: relative. Then put the child inside the div. |
#8
| |||
| |||
|
|
On Mar 28, 4:28 pm, Ben C <spams... (AT) spam (DOT) eggs> wrote: On 2008-03-28, vunet <vunet... (AT) gmail (DOT) com> wrote: [...] Sorry I do not have external URL now. I simply want to know how to position any Pop-up Box element next to each cell of my table when user moves mouse over that cell. It's like a balloon effect. But that balloon should pop up right outside the cell. That's all. You should have said it was a table-cell in the first place-- your example was a div, which is normally display: block. Firefox doesn't allow table cells to be containers for positioned descendents. That's why it doesn't work. Firefox is just about within the spec as it says the effect of position: relative on table cells is undefined (although I think it really means the effect of trying to offset them, not the side-effect of being a container for positioned descendents). You can put a div inside the table cell and make the div position: relative. Then put the child inside the div. Yes! That fixed. Now I know. In IE6 however, this floating div hides behind cell's borders and some images within the cells (not upfront as supposed to). I added z-index which did not solve the problem. Is there something else I do not know about the browser's behavior? |
#9
| |||
| |||
|
|
On Mar 28, 4:28 pm, Ben C <spams... (AT) spam (DOT) eggs> wrote: On 2008-03-28, vunet <vunet... (AT) gmail (DOT) com> wrote: On Mar 28, 4:02 pm, Bergamot <berga... (AT) visi (DOT) com> wrote: vunet wrote: On Mar 28, 3:07 pm, "Jonathan N. Little" <lws4... (AT) central (DOT) net wrote: vunet wrote: How to position a child outside of the parent with CSS? #parent { position: relative; ...} #child { position: absolute; ...} when I set top and left to some values it seems to be as if "body" is the parent even though I append child to parent. That's why you should post a URL instead of a code snippet. There is obviously more to this than you're telling. -- Berg Sorry I do not have external URL now. I simply want to know how to position any Pop-up Box element next to each cell of my table when user moves mouse over that cell. It's like a balloon effect. But that balloon should pop up right outside the cell. That's all. You should have said it was a table-cell in the first place-- your example was a div, which is normally display: block. Firefox doesn't allow table cells to be containers for positioned descendents. That's why it doesn't work. Firefox is just about within the spec as it says the effect of position: relative on table cells is undefined (although I think it really means the effect of trying to offset them, not the side-effect of being a container for positioned descendents). You can put a div inside the table cell and make the div position: relative. Then put the child inside the div. Yes! That fixed. Now I know. In IE6 however, this floating div hides behind cell's borders and some images within the cells (not upfront as supposed to). I added z-index which did not solve the problem. Is there something else I do not know about the browser's behavior? |
#10
| |||
| |||
|
|
What I don't know about IE's behaviour would fill a book. |
![]() |
| Thread Tools | |
| Display Modes | |
| |