View Full Version : Absolute Positioning Q?

08-02-2012, 02:34 PM
I am curious about how I could absolute positioning more effectively - if I have the following setup:

<div id="Wrapper">
<div id="SubmitButton">Submit</div>

Is there a way I can get the inner div (SubmitButton) positioned absolutely based off of the Wrapper div? Like if I want the SubmitButton div to stay 5px from the top and 5px from the right even if the width is later changed?

Thanks, hope that makes sense.

08-02-2012, 02:43 PM
#wrapper {
position: relative;
#SubmitButton {
position: absolute;
top: 5px;
right: 5px;

This is probably page 1 of any discussion of absolute positioning :confused: :rolleyes:

08-02-2012, 07:43 PM
Thanks very much. I usually skip page 1.

08-02-2012, 10:24 PM
Awesome thank you - very useful for divs. When I try to place a submit button within a form field using this relative / absolute style of positioning it doesn't work. Any idea why?

Just curious.

08-03-2012, 12:51 AM
Show the relevant piece of HTML and CSS.