|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th-1:00PM EST. Register Today!
|
|
#1
|
|||
|
|||
|
postioning divs
is there a simple way to do this?
what I need to do is lay one div on top of another. the first being of relative posstion on the screen. I can't make the second one relative because it comes out below the first. I can't make it absolute because I dno't have the location of the relative first one. I can't make the div inside the other because they need to be seperate for other reasons. Is there an easy way or do I have to get all complex again! |
|
#2
|
|||
|
|||
|
RE: postioning divs
I know I could javascript to get the position of the first and then move the second one, but if I can avoid do that I would be a happy man
|
|
#3
|
|||
|
|||
|
RE: postioning divs
even when I cheat and use relative - height (image in table so comes out below first)
it does place the second on top of the first BUT it also throws a big space in table where it should be! I am using display: block on both images. may is that, I have positioing or space issues in the table cell UNTIL I put the second div in there. (That was a different problem!) |
|
#4
|
|||
|
|||
|
RE: postioning divs
using a relative placed container, and putting the other 2 absolutely positioned in there should do the trick:
<div style="position: relative"> <div id="div1" style="position: absolute; top: 0px; left: 0xp; height: 100px; width: 100px">number 1</div> <div id="div2" style="position: absolute; top: 0px; left: 0xp; height: 100px; width: 100px">number 2</div> </div> |
|
#5
|
|||
|
|||
|
RE: postioning divs
funny how it gets to a point where you always look for complex solutions and never dream there would a simple one.
DOH!!!! such an easy fix, thanks again! |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Client Side Things > postioning divs |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|