Closed Bug 102678 Opened 23 years ago Closed 23 years ago

getComputedStyle returns wrong width for elements wider than the browser window

Categories

(Core :: DOM: CSS Object Model, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: nick, Assigned: bzbarsky)

References

Details

Attachments

(1 file)

If there is a element on a page which is wider than the browser window, for example a very large image, getComputedStyle returns the wrong width for that element. It seems that the width returned is the width of the part of the element that is visible on screen.
Another one for you, Boris :-)
Assignee: jst → bzbarsky
Blocks: 42417
Status: UNCONFIRMED → NEW
Ever confirmed: true
The <div> is _not_ wider than the window. It is in fact exactly the width of the window (minus the body's margins). The image overflows the <div> (try putting a border on the div to see this; also try setting a negative right margin on the div to see the effect). getComputedStyle() is correctly reporting the div's width. getComputedStyle() on the image itself produces the right value (1200px), by the way. So I'm not sure what the bug is here. Resolving invalid, but please reopen if I missed something.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: