Bug 67566 - Wrong sizing of absolutely positioned form fields when both left/right are set
Summary: Wrong sizing of absolutely positioned form fields when both left/right are set
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL: http://jsfiddle.net/leaverou/PTxSE/4/...
Depends on:
Reported: 2011-09-03 11:10 PDT by Lea Verou
Modified: 2016-02-11 10:50 PST (History)
6 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Lea Verou 2011-09-03 11:10:18 PDT
Webkit treats form fields just like every other element and when both left and right are set, it stretches them horizontally to satisfy both declarations.

However this, convenient as it may be, is opposed to both what every other engine is doing AND the specification:
"The used value of ‘width’ and ‘height’ is determined as for inline replaced elements."
From http://www.w3.org/TR/css3-box/#abs-replaced

A blog post describing this issue: http://snook.ca/archives/html_and_css/absolute-position-textarea 
It also happens with inputs: http://jsfiddle.net/leaverou/PTxSE/4/show
But not all replaced elements: http://jsfiddle.net/leaverou/PTxSE/3/show
It also doesn't happen with top/bottom, only left/right: http://jsfiddle.net/leaverou/PTxSE/5/show

I also tested on Windows, and it's reproducible there as well.
Comment 1 Mark Rowe (bdash) 2011-09-07 21:42:13 PDT
Your test case for top/bottom does show the same behavior for top/bottom, it’s just not particularly visible because the height of the body element is only slightly larger than the textarea. If you increase the height of the body, either explicitly via height: 100% or by adding content to the element, then you’ll see the height of the textarea follow.
Comment 2 Daniel Scholtus 2016-02-11 10:50:39 PST
I believe this is solved…