Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
12-04-2005, 03:30 PM #1
- Join Date
- Dec 2005
- Thanked 0 Times in 0 Posts
CSS/DIV Position 2 layers in the same place
I am trying to create a button which switches a DIV layer to visible or not- so that the customer can either have a "NEW CUSTOMER" or "EXSITING CUSTOMER" box to use.
The problem is, the first box on the page will take up a lot of room, pushing the second DIV further down the page.
I would like both divs to start in the same place.
I was planning to use POSITION:ABSOLUTE, however, the position is not absolute, because the content above it could change.
How do i tell two DIV layers to position themselves at the top of a table?
12-04-2005, 04:09 PM #2
- Join Date
- Aug 2002
- Thanked 14 Times in 14 Posts
You could possibly use position:relative
Take a look at these 2 example divs they are both in the same place
<div style="width:100px;height:25px;border:1px solid red">Hello World</div>
<div style="position:relative;top:-25px;width:120px;height:25px;border:1px solid blue">Hello World</div>
The silent one.
The most dangerous thing in the world is an idea.
The most dangerous person in the world is the one with an idea.