DHTML: IE Absolute Coordinates Hack
I found a handy IE hack. Since I couldn't find it anywhere on the net, I thought I'd post it.
The problem is that in IE 6, it's not possible to get the absolute (global) coordinates of an element, unless it's position property is set to "absolute". So if you have a relatively positioned element, IE does not give you a way to get it's position relative to the upper-left corner of the browser window. (In Firefox you can simply use the element.x and element.y properties.)
My solution was to use JavaScript to briefly switch the element's positioning to "absolute", grab the coordinates, and then immediately switch it back to relative.
This trick can be especially helpful if you're doing a liquid layout.
The problem is that in IE 6, it's not possible to get the absolute (global) coordinates of an element, unless it's position property is set to "absolute". So if you have a relatively positioned element, IE does not give you a way to get it's position relative to the upper-left corner of the browser window. (In Firefox you can simply use the element.x and element.y properties.)
My solution was to use JavaScript to briefly switch the element's positioning to "absolute", grab the coordinates, and then immediately switch it back to relative.
var elementX = element.x;
var elementY = element.y;
if(!elementX){//hack for IE
element.style.position = "absolute";
elementX = element.offsetLeft;
elementY = element.offsetTop;
element.style.position = "relative";
}
This trick can be especially helpful if you're doing a liquid layout.
14 Comments:
element.x, element.y doesnt work for mosilla as well!
By
Anonymous, at 10:25 AM
Weird. I was using this trick with an IMG element in Firefox. Images do have have absolute x and y properties in FF, but other elements do not. In any case, this technique should work to find the absolute position of any element in any browser.
By
adampasz, at 8:19 PM
thanks, that solved my day
By
Anonymous, at 1:01 AM
wow power leveling
wow powerleveling
world of warcraft power leveling
ffxi power leveling
ffxi powerleveling
ffxi
ffxi gil
age of conan
lotro powerleveling
lotro power leveling
lotro goldwow power leveling
wow powerleveling
world of warcraft power leveling
ffxi power leveling
ffxi powerleveling
ffxi
ffxi gil
age of conan
lotro powerleveling
lotro power leveling
lotro goldwow power leveling
wow powerleveling
world of warcraft power leveling
ffxi power leveling
ffxi powerleveling
ffxi
ffxi gil
age of conan
lotro powerleveling
lotro power leveling
lotro goldwow power leveling
wow powerleveling
world of warcraft power leveling
ffxi power leveling
ffxi powerleveling
ffxi
ffxi gil
age of conan
lotro powerleveling
lotro power leveling
lotro goldwow power leveling
wow powerleveling
world of warcraft power leveling
ffxi power leveling
ffxi powerleveling
ffxi
ffxi gil
age of conan
lotro powerleveling
lotro power leveling
lotro goldwow power leveling
wow powerleveling
world of warcraft power leveling
ffxi power leveling
ffxi powerleveling
ffxi
ffxi gil
age of conan
lotro powerleveling
lotro power leveling
lotro goldwow power leveling
wow powerleveling
world of warcraft power leveling
ffxi power leveling
ffxi powerleveling
ffxi
ffxi gil
age of conan
lotro powerleveling
lotro power leveling
lotro goldwow power leveling
wow powerleveling
world of warcraft power leveling
ffxi power leveling
ffxi powerleveling
ffxi
ffxi gil
age of conan
lotro powerleveling
lotro power leveling
lotro gold
By
wow power leveling, at 11:13 PM
runescape money runescape gold runescape gold runescape money buy runescape gold buy runescape money runescape money runescape gold wow power leveling wow powerleveling Warcraft Power Leveling Warcraft PowerLeveling buy runescape gold buy runescape money runescape items runescape accounts runescape gp dofus kamas buy dofus kamas Guild Wars Gold buy Guild Wars Gold lotro gold buy lotro gold lotro gold buy lotro gold lotro gold buy lotro gold runescape money runescape power leveling runescape money runescape gold dofus kamas cheap runescape money cheap runescape gold Hellgate Palladium Hellgate London Palladium Hellgate money Tabula Rasa gold tabula rasa money Tabula Rasa Credit Tabula Rasa Credits Hellgate gold Hellgate London gold wow power leveling wow powerleveling Warcraft PowerLeveling Warcraft Power Leveling World of Warcraft PowerLeveling World of Warcraft Power Leveling runescape power leveling runescape powerleveling eve isk eve online isk eve isk eve online isk tibia gold Fiesta Silver Fiesta Gold SilkRoad Gold buy SilkRoad Gold runescape accounts buy runescape accounts rs2 accounts buy rs2 accounts runescape power leveling rs2 power leveling FFXI Gil buy FFXI Gil gaia gold buy gaia gold buy dofus kamas buy dofus kamas dofus kamas runescape accounts buy runescape accounts rs2 accounts buy rs2 accounts runescape power leveling rs2 power leveling rs2 gold buy rs2 gold runescape
By
Anonymous, at 5:52 PM
runescape money runescape gold tibia item tibia gold runescape accounts tibia money runescape gp buy runescape gold tibia gold tibia item buy runescape money runescape items tibia money
By
Anonymous, at 12:02 AM
lucky lesbians -
mad sex party -
man hunter -
me fuck you long time -
milf seeker -
mondo rossi -
my fetish -
my sex tour -
naughty nati -
newbie girls -
new solos -
orgy sex parties -
oriental orgy -
party hardcore -
phat booty hunter -
pimp 4 a day -
pink eye surprise -
pissing in action -
plug her holes -
porn stud search -
pov hardcore -
randy blue -
real big hooters -
road side pickups -
sara sexton -
scoreland -
semen slurpers -
sex search -
sex toy teens -
sexy round asses -
she got pimped -
shemale ambush -
shots of cum -
simple fucks -
slut movies -
sluts on a leash -
smoking foxes -
solo bang -
solo girls -
solo sydney -
squirt hunter -
squirting chicks -
stay after class -
suck me bitch -
sugar mamas -
super twink -
swallow this bitch -
sugar mamas -
super twink -
swallow this bitch -
teenage whores -
teen body -
teens for cash -
teen slut bus -
the best latinas -
the best pov -
tittie fuckers -
tokyo pickups -
tranny trouble -
trans sexualz -
twinks for cash -
tyrannized -
video chicks -
video seekers -
virgin teen lesbians -
virtual chicks -
want wendy -
we hunt milf -
white boy stomp -
wild fuck toys -
wild porn pass -
wrong side of town -
diary of a nanny -
18 inches of pain -
all about ashley -
all wam -
amazing gangbangs -
anal hell -
asian parade -
ass plundering -
back seat bangers -
bang boat -
bang my hot wife -
bare foot bad girls -
bi maxx -
bj sandwich -
black cocks white sluts -
boob exam scam -
born 2 porn -
bottom lickers -
brown hair girls -
brutal blowjobs -
bubble butts galore -
busty solos -
caught on spy cams -
club seventeen -
college wild parties -
couples seduce teens -
cum on jugs -
cum swap sluts -
dildo brutality -
double anal plugged -
dream kelly -
drunk sex orgy -
ebony cheeks -
ero maxx -
first time swallows -
foot cravings -
foot erotica -
fresh auditions -
fresh facials -
fresh teens -
from ass to mouth -
fucking abuse -
fuck the babysitter -
fully clothed pissing -
gangbang squad -
gape her ass -
gay blind date sex -
gay college sex parties -
gay hitchhiker -
gay sex resort -
gay solos -
girls that gush -
gooey holes -
guys go crazy -
her 1st anal -
her first anal sex -
her first big cock -
her first dp -
her first lesbian sex -
his first facial -
his first gay sex -
his first huge cock -
hot campus teens -
hot haley -
hot nude granny -
housewife bangers -
huge boobs galore -
insane cock brothas -
jenny heart -
just facials -
kinky mature sluts -
knee high sox -
latina sex -
lick that ass -
lucky lesbians -
mad sex party -
man hunter -
me fuck you long time -
milf seeker -
mondo rossi -
my fetish -
my sex tour -
naughty nati -
newbie girls -
new solos -
orgy sex parties -
oriental orgy -
party hardcore -
phat booty hunter -
pimp 4 a day -
pink eye surprise -
pissing in action -
plug her holes -
porn stud search -
pov hardcore -
randy blue -
real big hooters -
road side pickups -
sara sexton -
scoreland -
semen slurpers -
sex search -
sex toy teens -
sexy round asses -
she got pimped -
shemale ambush -
shots of cum -
simple fucks -
slut movies -
sluts on a leash -
smoking foxes -
solo bang -
solo girls -
solo sydney -
squirt hunter -
squirting chicks -
stay after class -
suck me bitch -
sugar mamas -
super twink -
swallow this bitch -
sugar mamas -
super twink -
swallow this bitch -
teenage whores -
teen body -
teens for cash -
teen slut bus -
the best latinas -
the best pov -
tittie fuckers -
tokyo pickups -
tranny trouble -
trans sexualz -
twinks for cash -
tyrannized -
video chicks -
video seekers -
virgin teen lesbians -
virtual chicks -
want wendy -
we hunt milf -
white boy stomp -
wild fuck toys -
wild porn pass -
wrong side of town -
discount reality sites -
18 inches of pain -
all about ashley -
all wam -
amazing gangbangs -
anal hell -
asian parade -
ass plundering -
back seat bangers -
bang boat -
bang my hot wife -
bare foot bad girls -
bi maxx -
bj sandwich -
black cocks white sluts -
boob exam scam -
born 2 porn -
bottom lickers -
brown hair girls -
brutal blowjobs -
bubble butts galore -
busty solos -
caught on spy cams -
club seventeen -
college wild parties -
couples seduce teens -
cum on jugs -
cum swap sluts -
dildo brutality -
double anal plugged -
dream kelly -
drunk sex orgy -
ebony cheeks -
ero maxx -
first time swallows -
foot cravings -
foot erotica -
fresh auditions -
fresh facials -
fresh teens -
from ass to mouth -
fucking abuse -
fuck the babysitter -
fully clothed pissing -
gangbang squad -
gape her ass -
gay blind date sex -
gay college sex parties -
gay hitchhiker -
gay sex resort -
gay solos -
girls that gush -
gooey holes -
guys go crazy -
her 1st anal -
her first anal sex -
her first big cock -
her first dp -
her first lesbian sex -
his first facial -
his first gay sex -
his first huge cock -
hot campus teens -
hot haley -
hot nude granny -
housewife bangers -
huge boobs galore -
insane cock brothas -
jenny heart -
just facials -
kinky mature sluts -
knee high sox -
latina sex -
lick that ass -
lucky lesbians -
mad sex party -
man hunter -
me fuck you long time -
milf seeker -
mondo rossi -
my fetish -
my sex tour -
naughty nati -
newbie girls -
new solos -
orgy sex parties -
oriental orgy -
party hardcore -
phat booty hunter -
pimp 4 a day -
pink eye surprise -
pissing in action -
plug her holes -
porn stud search -
pov hardcore -
randy blue -
real big hooters -
road side pickups -
sara sexton -
scoreland -
semen slurpers -
sex search -
sex toy teens -
sexy round asses -
she got pimped -
shemale ambush -
shots of cum -
simple fucks -
slut movies -
sluts on a leash -
smoking foxes -
solo bang -
solo girls -
solo sydney -
squirt hunter -
squirting chicks -
stay after class -
suck me bitch -
sugar mamas -
super twink -
swallow this bitch -
sugar mamas -
super twink -
swallow this bitch -
teenage whores -
teen body -
teens for cash -
teen slut bus -
the best latinas -
the best pov -
tittie fuckers -
tokyo pickups -
tranny trouble -
trans sexualz -
twinks for cash -
tyrannized -
video chicks -
video seekers -
virgin teen lesbians -
virtual chicks -
want wendy -
we hunt milf -
white boy stomp -
wild fuck toys -
wild porn pass -
wrong side of town -
eat my black meat -
18 inches of pain -
all about ashley -
all wam -
amazing gangbangs -
anal hell -
asian parade -
ass plundering -
back seat bangers -
bang boat -
bang my hot wife -
bare foot bad girls -
bi maxx -
bj sandwich -
black cocks white sluts -
boob exam scam -
born 2 porn -
bottom lickers -
brown hair girls -
brutal blowjobs -
bubble butts galore -
busty solos -
caught on spy cams -
club seventeen -
college wild parties -
couples seduce teens -
cum on jugs -
cum swap sluts -
dildo brutality -
double anal plugged -
dream kelly -
drunk sex orgy -
ebony cheeks -
ero maxx -
first time swallows -
foot cravings -
foot erotica -
fresh auditions -
fresh facials -
fresh teens -
from ass to mouth -
fucking abuse -
fuck the babysitter -
fully clothed pissing -
gangbang squad -
gape her ass -
gay blind date sex -
gay college sex parties -
gay hitchhiker -
gay sex resort -
gay solos -
girls that gush -
gooey holes -
guys go crazy -
her 1st anal -
her first anal sex -
her first big cock -
her first dp -
her first lesbian sex -
his first facial -
his first gay sex -
his first huge cock -
hot campus teens -
hot haley -
hot nude granny -
housewife bangers -
huge boobs galore -
insane cock brothas -
jenny heart -
just facials -
kinky mature sluts -
knee high sox -
latina sex -
lick that ass -
lucky lesbians -
mad sex party -
man hunter -
me fuck you long time -
milf seeker -
mondo rossi -
my fetish -
my sex tour -
naughty nati -
newbie girls -
new solos -
orgy sex parties -
oriental orgy -
party hardcore -
phat booty hunter -
pimp 4 a day -
pink eye surprise -
pissing in action -
plug her holes -
porn stud search -
pov hardcore -
randy blue -
real big hooters -
road side pickups -
sara sexton -
scoreland -
semen slurpers -
sex search -
sex toy teens -
sexy round asses -
she got pimped -
shemale ambush -
shots of cum -
simple fucks -
slut movies -
sluts on a leash -
smoking foxes -
solo bang -
solo girls -
solo sydney -
squirt hunter -
squirting chicks -
stay after class -
suck me bitch -
sugar mamas -
super twink -
swallow this bitch -
sugar mamas -
super twink -
swallow this bitch -
teenage whores -
teen body -
teens for cash -
teen slut bus -
the best latinas -
the best pov -
tittie fuckers -
tokyo pickups -
tranny trouble -
trans sexualz -
twinks for cash -
tyrannized -
video chicks -
video seekers -
virgin teen lesbians -
virtual chicks -
want wendy -
we hunt milf -
white boy stomp -
wild fuck toys -
wild porn pass -
wrong side of town -
euro bride tryouts -
18 inches of pain -
all about ashley -
all wam -
amazing gangbangs -
anal hell -
asian parade -
ass plundering -
back seat bangers -
bang boat -
bang my hot wife -
bare foot bad girls -
bi maxx -
bj sandwich -
black cocks white sluts -
boob exam scam -
born 2 porn -
bottom lickers -
brown hair girls -
brutal blowjobs -
bubble butts galore -
busty solos -
caught on spy cams -
club seventeen -
college wild parties -
couples seduce teens -
cum on jugs -
cum swap sluts -
dildo brutality -
double anal plugged -
dream kelly -
drunk sex orgy -
ebony cheeks -
ero maxx -
first time swallows -
foot cravings -
foot erotica -
fresh auditions -
fresh facials -
fresh teens -
from ass to mouth -
fucking abuse -
fuck the babysitter -
fully clothed pissing -
gangbang squad -
gape her ass -
gay blind date sex -
gay college sex parties -
gay hitchhiker -
gay sex resort -
gay solos -
girls that gush -
gooey holes -
guys go crazy -
her 1st anal -
her first anal sex -
her first big cock -
her first dp -
her first lesbian sex -
his first facial -
his first gay sex -
his first huge cock -
hot campus teens -
hot haley -
hot nude granny -
housewife bangers -
huge boobs galore -
insane cock brothas -
jenny heart -
just facials -
kinky mature sluts -
knee high sox -
latina sex -
lick that ass -
lucky lesbians -
mad sex party -
man hunter -
me fuck you long time -
milf seeker -
mondo rossi -
my fetish -
my sex tour -
naughty nati -
newbie girls -
new solos -
orgy sex parties -
oriental orgy -
party hardcore -
phat booty hunter -
pimp 4 a day -
pink eye surprise -
pissing in action -
plug her holes -
porn stud search -
pov hardcore -
randy blue -
real big hooters -
road side pickups -
sara sexton -
scoreland -
semen slurpers -
sex search -
sex toy teens -
sexy round asses -
she got pimped -
shemale ambush -
shots of cum -
simple fucks -
slut movies -
sluts on a leash -
smoking foxes -
solo bang -
solo girls -
solo sydney -
squirt hunter -
squirting chicks -
stay after class -
suck me bitch -
sugar mamas -
super twink -
swallow this bitch -
sugar mamas -
super twink -
swallow this bitch -
teenage whores -
teen body -
teens for cash -
teen slut bus -
the best latinas -
the best pov -
tittie fuckers -
tokyo pickups -
tranny trouble -
trans sexualz -
twinks for cash -
tyrannized -
video chicks -
video seekers -
virgin teen lesbians -
virtual chicks -
want wendy -
we hunt milf -
white boy stomp -
wild fuck toys -
wild porn pass -
wrong side of town -
euro teens xxx -
18 inches of pain -
all about ashley -
all wam -
amazing gangbangs -
anal hell -
asian parade -
ass plundering -
back seat bangers -
bang boat -
bang my hot wife -
bare foot bad girls -
bi maxx -
bj sandwich -
black cocks white sluts -
boob exam scam -
born 2 porn -
bottom lickers -
brown hair girls -
brutal blowjobs -
bubble butts galore -
busty solos -
caught on spy cams -
club seventeen -
college wild parties -
couples seduce teens -
cum on jugs -
cum swap sluts -
dildo brutality -
double anal plugged -
dream kelly -
drunk sex orgy -
ebony cheeks -
ero maxx -
first time swallows -
foot cravings -
foot erotica -
fresh auditions -
fresh facials -
fresh teens -
from ass to mouth -
fucking abuse -
fuck the babysitter -
fully clothed pissing -
gangbang squad -
gape her ass -
gay blind date sex -
gay college sex parties -
gay hitchhiker -
gay sex resort -
gay solos -
girls that gush -
gooey holes -
guys go crazy -
her 1st anal -
her first anal sex -
her first big cock -
her first dp -
her first lesbian sex -
his first facial -
his first gay sex -
his first huge cock -
hot campus teens -
hot haley -
hot nude granny -
housewife bangers -
huge boobs galore -
insane cock brothas -
jenny heart -
just facials -
kinky mature sluts -
knee high sox -
latina sex -
lick that ass -
lucky lesbians -
mad sex party -
man hunter -
me fuck you long time -
milf seeker -
mondo rossi -
my fetish -
my sex tour -
naughty nati -
newbie girls -
new solos -
orgy sex parties -
oriental orgy -
party hardcore -
phat booty hunter -
pimp 4 a day -
pink eye surprise -
pissing in action -
plug her holes -
porn stud search -
pov hardcore -
randy blue -
real big hooters -
road side pickups -
sara sexton -
scoreland -
semen slurpers -
By
Anonymous, at 1:03 AM
sex search -
sex toy teens -
sexy round asses -
she got pimped -
shemale ambush -
shots of cum -
simple fucks -
slut movies -
sluts on a leash -
smoking foxes -
solo bang -
solo girls -
solo sydney -
squirt hunter -
squirting chicks -
stay after class -
suck me bitch -
sugar mamas -
super twink -
swallow this bitch -
sugar mamas -
super twink -
swallow this bitch -
teenage whores -
teen body -
teens for cash -
teen slut bus -
the best latinas -
the best pov -
tittie fuckers -
tokyo pickups -
tranny trouble -
trans sexualz -
twinks for cash -
tyrannized -
video chicks -
video seekers -
virgin teen lesbians -
virtual chicks -
want wendy -
we hunt milf -
white boy stomp -
wild fuck toys -
wild porn pass -
wrong side of town -
extreme asses -
18 inches of pain -
all about ashley -
all wam -
amazing gangbangs -
anal hell -
asian parade -
ass plundering -
back seat bangers -
bang boat -
bang my hot wife -
bare foot bad girls -
bi maxx -
bj sandwich -
black cocks white sluts -
boob exam scam -
born 2 porn -
bottom lickers -
brown hair girls -
brutal blowjobs -
bubble butts galore -
busty solos -
caught on spy cams -
club seventeen -
college wild parties -
couples seduce teens -
cum on jugs -
cum swap sluts -
dildo brutality -
double anal plugged -
dream kelly -
drunk sex orgy -
ebony cheeks -
ero maxx -
first time swallows -
foot cravings -
foot erotica -
fresh auditions -
fresh facials -
fresh teens -
from ass to mouth -
fucking abuse -
fuck the babysitter -
fully clothed pissing -
gangbang squad -
gape her ass -
gay blind date sex -
gay college sex parties -
gay hitchhiker -
gay sex resort -
gay solos -
girls that gush -
gooey holes -
guys go crazy -
her 1st anal -
her first anal sex -
her first big cock -
her first dp -
her first lesbian sex -
his first facial -
his first gay sex -
his first huge cock -
hot campus teens -
hot haley -
hot nude granny -
housewife bangers -
huge boobs galore -
insane cock brothas -
jenny heart -
just facials -
kinky mature sluts -
knee high sox -
latina sex -
lick that ass -
lucky lesbians -
mad sex party -
man hunter -
me fuck you long time -
milf seeker -
mondo rossi -
my fetish -
my sex tour -
naughty nati -
newbie girls -
new solos -
orgy sex parties -
oriental orgy -
party hardcore -
phat booty hunter -
pimp 4 a day -
pink eye surprise -
pissing in action -
plug her holes -
porn stud search -
pov hardcore -
randy blue -
real big hooters -
road side pickups -
sara sexton -
scoreland -
semen slurpers -
sex search -
sex toy teens -
sexy round asses -
she got pimped -
shemale ambush -
shots of cum -
simple fucks -
slut movies -
sluts on a leash -
smoking foxes -
solo bang -
solo girls -
solo sydney -
squirt hunter -
squirting chicks -
stay after class -
suck me bitch -
sugar mamas -
super twink -
swallow this bitch -
sugar mamas -
super twink -
swallow this bitch -
teenage whores -
teen body -
teens for cash -
teen slut bus -
the best latinas -
the best pov -
tittie fuckers -
tokyo pickups -
tranny trouble -
trans sexualz -
twinks for cash -
tyrannized -
video chicks -
video seekers -
virgin teen lesbians -
virtual chicks -
want wendy -
we hunt milf -
white boy stomp -
wild fuck toys -
wild porn pass -
wrong side of town -
first time swallows -
18 inches of pain -
all about ashley -
all wam -
amazing gangbangs -
anal hell -
asian parade -
ass plundering -
back seat bangers -
bang boat -
bang my hot wife -
bare foot bad girls -
bi maxx -
bj sandwich -
black cocks white sluts -
boob exam scam -
born 2 porn -
bottom lickers -
brown hair girls -
brutal blowjobs -
bubble butts galore -
busty solos -
caught on spy cams -
club seventeen -
college wild parties -
couples seduce teens -
cum on jugs -
cum swap sluts -
dildo brutality -
double anal plugged -
dream kelly -
drunk sex orgy -
ebony cheeks -
ero maxx -
first time swallows -
foot cravings -
foot erotica -
fresh auditions -
fresh facials -
fresh teens -
from ass to mouth -
fucking abuse -
fuck the babysitter -
fully clothed pissing -
gangbang squad -
gape her ass -
gay blind date sex -
gay college sex parties -
gay hitchhiker -
gay sex resort -
gay solos -
girls that gush -
gooey holes -