Absolutely position a div inside a relative position element

The task is to modify an existing javascript include file. More details, including the sample HTML that includes it is in attached zip archvive.


The DIV needs to be positioned absolutely and to do this a correct position of text ad box needs to be obtained from browser. This position is obtained by traversing offsetParent object all the way to the root and getting totals

offsetLeft and offsetTop

function getAbsolutePosition(element) {

var r = { x: [url removed, login to view], y: [url removed, login to view] };

if ([url removed, login to view]) {

var tmp = getAbsolutePosition([url removed, login to view]);

r.x += tmp.x;

r.y += tmp.y;


return r;


However, this does not work reliably for structures that have some of the elements POSITION:RELATIVE – hence the attached sample. Please run [url removed, login to view] in IE6, under 1280x1024 or similar resolution. You can see that the HTML page uses a CSS file which contains two elements positioned relatively:

#container {

POSITION: relative; …


#wrapper {

POSITION: relative; …


Removing these statements fixes the problem, but we cannot do that since we are just an include file in this file and don’t own the actual HTML.

For expert level javascript developer we estimate the task to be only a few hours long. Please provide a fixed bid cost and state wether the cost is for Part A or for Part B or both. For both parts we will definately pay more than $100. Please take a few minutes to read the attached document.

Beceriler: Javascript

Daha fazlasını gör: position div inside div, javascript position element, javascript position div, javascript div position, javascript position relative, div inside div position, div position inside div, position relative inside div, positioning div inside div, div relative element, javascript position inside div, position div relative element, javascript div position relative, div position javascript, position div javascript, javascript getting position within relative div, div relative position, position inside div, div position inside, javascript position within div, div position relative click, div inside div relative, javascript relative position, element position div, absolutely position

İşveren Hakkında:
( 9 değerlendirme ) Brooklyn, United States

Proje NO: #200384



Dear Sir. I'm pleased to bid on your project. Our team is expert in javascript coding. Now your needs are clear. I'm sure we can complete this one for 1 or 2 days. We are thankful if you pay about $150 for both pa Daha Fazla

1 gün içinde %selectedBids___i_sum_sub_4%%project_currencyDetails_sign_sub_5% USD
(1 Yorum)

Bu iş için 6 freelancer ortalamada $73 teklif veriyor


Hello, please check your PMB

in %bids___i_period_sub_35% gün içinde30%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(20 Değerlendirme)

hi check your PMB. regards adnan

in %bids___i_period_sub_35% gün içinde100%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(6 Değerlendirme)

Please see my PM. Regards.

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(2 Değerlendirme)

Ok I see your [url removed, login to view] give me this job to me i can complete this site. i need 150$ for total working. Best Regards.

in %bids___i_period_sub_35% gün içinde30%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(0 Değerlendirme)

I am front end Engineer and doing this type of stuff.

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(0 Değerlendirme)