View Full Version : absolute positioning within frame

12-22-2010, 06:56 AM
How do i do it?

if i had two objects:

<p class="1">asdf</p>
<img class="2"></img>

and their classes

position: absolute;
top: 40px;
left: 40px;

position: absolute;
top: 100px;
left: 100px;

how do i make this work within a page if i want to make a box around them and say (0,0) is located at (100,100) on the page, which would make my "<p>" be located at (140,140)

How do i do this?

12-22-2010, 03:02 PM
Generally speaking, set up "relative" positioning on the containing element.