block-elements like <br>, <div>, display:block breaks inline-block

VERIFIED DUPLICATE of bug 9458

Status

()

Core
Layout: Block and Inline
--
major
VERIFIED DUPLICATE of bug 9458
11 years ago
11 years ago

People

(Reporter: Armin Dressler, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

11 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.2) Gecko/20070220 Firefox/2.0.0.2
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.2) Gecko/20070220 Firefox/2.0.0.2

All block-generating elements like for example <br>, <div>,
"display:block" break inline-block elements in a way, that these
elements are not inlined at all.

Reproducible: Always

Steps to Reproduce:
1. Place one or more block elements inside an inline-block.

Example code:

<html>
  <body>

    foo:
    <span style="display:inline-block; vertical-align:top">
      bar<br/>
      baz
    </span>
    <br/><br/>

    foo:
    <span style="display:inline-block; vertical-align:top">
      <span style="display:block">bar</span>
      <span style="display:block">baz</span>
    </span>
    <br/><br/>

    foo:
    <span style="display:inline-block; vertical-align:top">
      <div>bar</div>
      <div>baz</div>
    </span>
  </body>
</html>

Actual Results:  
The inline-block is broken. The output of the example source looks like
this:

foo: bar
baz

foo:
bar
baz

foo:
bar
baz


Expected Results:  
The inline-block should be intact in all three cases:

foo: bar
     baz

foo: bar
     baz

foo: bar
     baz

Comment 1

11 years ago
Firefox 2.0 does _not_ support display:inline-block and it displays your sample code accordingly, but not as you expect.
Gecko 1.9a trunk builds (Minefield) do support inline-block and display your sample correctly (fixed in bug 9458).

Or did you mean to file a bug against those trunk builds ?

(btw, your sample code is invalid, a <div> cannot be a descendant of a <span>)
(Reporter)

Comment 2

11 years ago
No, I tested with the mentioned Firefox release, not against trunk builds. It was not clear to me that Firefox does not support block-inlines in the latest release.
Sorry for the div-span mixture. It was just a quick test, that rendered as expected in other browsers (test 1-3 tested with Safari and Konqueror, test 2 tested with IE7).

Thanks for your help!

Comment 3

11 years ago
OK then, marking as duplicate of bug 9458.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 9458
v.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.