Status: Unconfirmed
Owner: ----
Labels: Type-Bug Pri-2 OS-All Area-Misc
New issue 9680 by [email protected]: html elements do not return
correct height or offsetheight values
http://code.google.com/p/chromium/issues/detail?id=9680
Chrome Version : 1.0.154.53
URLs (if applicable) :
Other browsers tested:
Add OK or FAIL after other browsers where you have tested this issue:
Safari 4:OK
Firefox 3.x:OK
Opera 9.63:OK
IE 7:NA
IE 8:NA
What steps will reproduce the problem?
1. Tested using <div> elements - create a div, use css formatting but do
not give height values, add text
between tags.
2. Use javascript (jQuery) to retrieve height value
[$('#DivID').css('height')].
What is the expected result?
1. Value returned should be calculated real height of <div> not counting
margins, padding, and borders,
shown in pixels.
2. offsetHeight should (I think) return the value including the borders,
margins, and padding (this is
surmised behavior).
What happens instead?
1. Height value returned is not the actual value. Typically it is much less
than what is expected when
dealing with a single line of text. This value can also be much larger than
expected if the <div> contains
children <div> elements.
2. Value is not set even when given in an external css file, although
visually appears to take and use the
css value.
3. Value is updated when changed directly via javascript (jQuery), and then
returns correct value
thereafter.
4. Height and offsetHeight always seem to return the same values, as if
copied from one to the other.
Please provide any additional information below. Attach a screenshot if
possible.
I am trying to create an adaptive client area to adjust for the different
browser screen display fields,
so that my website maintains a proportional arrangement. To do that, I need
this value to be calculated
and returned properly, because other <div> elements are position-based
according to the height of the preceding element.
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
--~--~---------~--~----~------------~-------~--~----~
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/group/chromium-bugs
-~----------~----~----~----~------~----~------~--~---