Skip to content

Firefox bug: Figures break grid #21886

@alienlebarge

Description

@alienlebarge

Description

When using Figures in a grid, it doesn't fit the width of the container.

Here's a Pen to reproduce the bug

Environment

Cause

The problem is caused by the following code:

.figure {
  // Ensures the caption's text aligns with the image.
  display: inline-block;
}

Additional Info

  <div class="row">
    
    <article class="col-md-6">
      <figure class="figure">
        <img src="..." class="figure-img img-fluid rounded" alt="...">
        <figcaption class="figure-caption">...</figcaption>
      </figure>
      <p>...</p>
    </article><!-- /.col-md-6 -->
    
    <article class="col-md-6">
      <figure class="figure">
        <img src="..." class="figure-img img-fluid rounded" alt="...">
        <figcaption class="figure-caption">...</figcaption>
      </figure>
      <p>...</p>
    </article><!-- /.col-md-6 -->

  </div><!-- /.row -->

Firefox 45
Chrome 55

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions