Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Element width visible but equals 0

Status
Not open for further replies.

jnoody

Programmer
May 14, 2004
19
US
I see that this topic has been discussed, but I have a more specific problem.

element.offsetWidth usually works for me, but I am having a problem where in one case (not sure why), I am getting a return of 0 for the width of an element that is visible and definately not width 0. Also, this relatively positioned element's offsetLeft and offsetTop are -1. Any ideas?
 
Yes, I have tried clientWidth as well. Both equal 0.
 
Set a border on the element to make sure the width you think you see actually belongs to the element in question.

Sincerely,

Tom Anderson
Order amid Chaos, Inc.
 
I have made sure that I am accessing the correct element, thoroughly.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top