This is a discussion on "Please help - position problem with nested divs" within the Web Page Design section. This forum, and the thread "Please help - position problem with nested divs are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
Please help - position problem with nested divs
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
Please help - position problem with nested divs
Hi all
I am having problems with my relative positioning in my nested divs. I thought that the nested div pos would be relative to the container div ??? i can not get the 2nd and 4th sub-divs to position opposite the headings. eg alongside the Agency name: i want to position the input box which has the initial value of Private. and alongside Your refference i want the other input box (div4) I have set them both at top:0 and stii they are about 40px lower than where i want. I thought that top:0 would be relative to the containing div (layer3) but it doesn't seem so ?? here is the code: thanks if you can put me straight HTML Code: <!-- START OF LAYER 3 --> <div id= 'layer3' style='width:260px; height:250px; background-color: #ffff00;width:260px;position:absolute;left:10px; top:300px;' > <center><b>For Agents Use.</b></center> <div style='width:240px;position:relative;left:10px; top:20px;' > Agency name:<br> <span class="det1">If you are acting as an agent for the company - please put your agency name. If not, leave as 'Private'.</span> </div> <div style='width:200px;position:relative;left:120px; top:0px;' > <input type="TEXT" name="x_agent" value = "<?php echo $N_agent ?>" size = '15' maxlength='40'/> </div> <div style='width:240px;position:relative;left:10px; top:20px;' > Your reference:<br> <span class="det1">If you have several adverts running you may want to use reference numbers. You can use numbers or letters. (optional)</span> </div> <div style='width:200px;position:relative;left:120px; top:0px;' > <input type="TEXT" name="x_opt_yr_ref" value = "<?php echo $N_opt_yr_ref ?>" size = '15' maxlength='20'/> </div> </div> <!-- END OF LAYER 3 --> ![]() |
|
|
|
#2
|
|||
|
|||
|
Re: Please help - position problem with nested divs
Can you post your whole page or a link, it would make it easier because then we can see the whole picture
|
![]() |
| Tags |
| help, position, problem, nested, divs |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Random position of multiple divs | benreynolds4 | JavaScript Forum | 3 | Feb 22nd, 2008 04:17 |
| Padding property problem in nested <div>s | mattlowe81 | Web Page Design | 2 | Apr 8th, 2006 16:00 |
| Nested Divs don't keep the right width | kpm547 | Web Page Design | 2 | May 18th, 2005 18:57 |
| Nested divs IE 5.2 Mac CSS2 bugs | wheatus | Web Page Design | 6 | Mar 31st, 2004 17:03 |