Please help - position problem with nested divs

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.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old May 21st, 2006, 15:06
Junior Member
Join Date: Jul 2004
Location: Bulgaria
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
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 -->

Reply With Quote

  #2 (permalink)  
Old May 21st, 2006, 15:10
Up'n'Coming Member
Join Date: Apr 2006
Location: Missouri
Age: 31
Posts: 65
Thanks: 0
Thanked 0 Times in 0 Posts
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
Reply With Quote
Reply

Tags
help, position, problem, nested, divs

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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


All times are GMT. The time now is 17:54.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43