Closed Bug 649964 Opened 14 years ago Closed 14 years ago

overflow:hidden to inline-block element makes it upper other inline-block elements

Categories

(Core :: Layout: Block and Inline, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: oleg.mokhov, Unassigned)

Details

User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0) Gecko/20100101 Firefox/4.0 Build Identifier: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0) Geck o/20100101 Firefox/4.0 Other browsers render this situation normally Reproducible: Always Steps to Reproduce: 1. Create html page and two inline-block elements at it 2. Give one of them overflow: hidden Actual Results: rendering bug: one element is upper than another Expected Results: No changes HTML testcase: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru"> <head> <title>ff bug</title> <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/> <style type="text/css"> .date { display: -moz-inline-box; display: inline-block; } .host { display: -moz-inline-box; display: inline-block; max-width: 100%; } .oh { overflow: hidden; } .wrap { width: 30%; background: #eee; float: left; margin-right: 10px; } </style> </head> <body> <h1>inline-block + overflow: hidden</h1> <div class="wrap"> <div class="host oh">i have overflow: hidden</div> <div class="date">22.02.2009</div> </div> <div class="wrap"> <div class="host">i don't have overflow: hidden</div> <div class="date">22.02.2009</div> </div> </body> </html>
Summary: overflow:hidden to inline-block element ups it → overflow:hidden to inline-block element makes it upper other inline-block elements
This is the behavior the CSS 2.1 spec requires. Please see the definition of the baseline of an inline-block and how setting 'overflow' affects it.
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.