Closed Bug 448887 Opened 16 years ago Closed 16 years ago

when the width of a child of an inline-block is a percentage, the inline-block's width remains as though the child had no specified width

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: boneslug, Unassigned)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1a1) Gecko/2008072306 Shiretoko/3.1a1
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1a1) Gecko/2008072306 Shiretoko/3.1a1

example given

Reproducible: Always

Steps to Reproduce:
<html>

<head><style>
div { display:inline-block; border:medium solid orange; }
div > div { border:thin dashed orange; max-width:50%; }
body > div:first-child > div { max-width:25em; }
</style></head>

<body>

<div>
<div><h1>this example text has a max width of 25em</h1></div>
<div><h2>Lorem ipsus</h2></div>
</div>

<div>
<div><h1>this example text has a max width of 50%</h1></div>
<div><h2>Lorem ipsus</h2></div>
</div>

</body></html>


Expected Results:  
seems incorrect to me...would not the expected behaviour be for the inline-block's width to conform to that of its children, regardless of how one limits the width of the children?
In case of the %-tage width/max-width/min-width, the resulting layout is undefined, per CSS 2.1:10.2
http://www.w3.org/TR/CSS21/visudet.html#propdef-width
(and 10.4 further down the page for min/max-width)

This would make this bug invalid.

WebKit behaves the same as Gecko.
Component: General → Layout: Block and Inline
OS: Linux → All
Product: Firefox → Core
QA Contact: general → layout.block-and-inline
Hardware: PC → All
INVALID per comment 1
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: