WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED CONFIGURATION CHANGED
171430
Buttons with zero width still affect parent's width
https://bugs.webkit.org/show_bug.cgi?id=171430
Summary
Buttons with zero width still affect parent's width
Cedric Reichenbach
Reported
2017-04-28 06:47:46 PDT
When setting `width: 0` on buttons in a container with variable with, they still occupy space (but are invisible). As a consequence, the container element has the same with as if those buttons had default width. Example: HTML: <div class="parent"> <button class="child">a</button> <button class="child">b</button> <button class="child">c</button> </div> CSS: .parent { float: left; border: 2px solid darkblue; } .child { float: left; width: 0px; padding: 0; margin: 0; border: none; overflow: hidden; } .parent:hover .child { width: auto; } The a sample in JSFiddle can be found here:
https://jsfiddle.net/4rsd84yg/9/
Attachments
Add attachment
proposed patch, testcase, etc.
Brent Fulgham
Comment 1
2022-07-15 11:16:43 PDT
In Safari 15.5+ all buttons show zero width, and the 'parent' container has zero width.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug