Skip to content

v4 - Make .card class display: block #18170

Closed

Description

@Skwai

Cards using an anchor element are rendering as inline as the display property is inherited, eg.

<a class="card card-block" href="#">
  <h4 class="card-text">The parent is inline</h4>
  <p class="card-text">This is some text</p>
</a>

Adding display: block; to .card class would fix this.

Activity

  1. changed the title [-]Make .card class display: block[/-] [+]v4 - Make .card class display: block[/+] on Nov 4, 2015
  2. added
    cssSass sources or compiled CSS
    v4v4, the frozen docs on gh-pages
    on Nov 4, 2015
  3. added this to the v4.0.0-alpha.2 milestone on Nov 15, 2015
  4. added a commit that references this issue on Nov 15, 2015
    0e77265
  5. mdo commented on Nov 15, 2015

    @mdo
    Member

    Fixed in #18255.

  6. added a commit that references this issue on Dec 9, 2015
  7. saeideh-mardan commented on Jan 29, 2018

    @saeideh-mardan

    I have my card with position absolute so this thing does not work at all for mw :( what are other ways?

  8. Skwai commented on Feb 5, 2018

    @Skwai
    Author

    position: absolute will override block positioning. You should give it an explicit width and height (or left/right/top/bottom). If you want to preserve its layout then use position: relative

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    cssSass sources or compiled CSSv4v4, the frozen docs on gh-pages

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions