New issue
Advanced search Search tips
Starred by 3 users
Status: IceBox
Owner: ----
Closed: Aug 2012
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

  • Only users with Commit permission may comment.

Sign in to add a comment
Incorrect offsetHeight() value
Reported by, Jul 24 2010 Back to list
Chrome Version       : 5.0.375.99
URLs (if applicable) :
Other browsers tested:
Add OK or FAIL after other browsers where you have tested this issue:
     Safari 4: N/A
  Firefox 3.x: OK
         IE 7: OK
         IE 8: OK

What steps will reproduce the problem?
1. <div> contains image (without explicit size value) offsetHeight() returns 0

What is the expected result?
I expect height of the <div> should be equal image's height

here is the code for testing:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
    <title>Chromium test</title>
    <script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
    <script type="application/x-javascript">
        var elem = document.getElementById('first');
        var elemScnd = document.getElementById('second');
<body style="background: #888;">
    <div id="wrapper" style="position: absolute; height: 100%; width: 100%;">
        <div id="first" style="position: absolute; top: 0; left: 0; width: 200px; background: #555;">
            <img src="spacer768.gif" alt="spacer768.gif" />
        <div id="second" style="width: 400px; background: #666; position: absolute; top: 0px; left: 0px;">
            <img src="spacer488.gif" alt="spacer768.gif" height="488" />
        <div id="third" style="position: absolute; width: 600px; background: #777;">

82 bytes View Download
88 bytes View Download
Project Member Comment 1 by, Aug 10 2012
Status: IceBox
Closing old bug as obsolete. Please file a new bug (with details) if this problem is still occurring for you.
Project Member Comment 2 by, Oct 13 2012
Labels: Restrict-AddIssueComment-Commit
This issue has been closed for some time. No one will pay attention to new comments.
If you are seeing this bug or have new data, please click New Issue to start a new bug.
Project Member Comment 3 by, Mar 11 2013
Labels: -Area-Undefined
Sign in to add a comment