Skip to content

text-truncate adding extra height to display block elements #36943

Open

Description

@jeysaravana

Prerequisites

Describe the issue

when we add display block elements with text-truncate, it adds little extra space in the bottom.
check here: https://codepen.io/jeysaravana/pen/YzaOZzd
Screen Shot 2022-08-11 at 12 10 04 PM

adding vertical-align: top; to inline style or adding align-top to the same elements are not fixing the issue.

only way to fix the issue is adding vertical-align: top; to text-truncate will fix the issue.

.text-truncate {
    vertical-align: top;
}

Reduced test cases

adding vertical-align: top; to text-truncate will fix the issue.

.text-truncate {
    vertical-align: top;
}

What operating system(s) are you seeing the problem on?

macOS

What browser(s) are you seeing the problem on?

Firefox

What version of Bootstrap are you using?

5.0.2

Activity

  1. added
    css
    v5
    on Aug 26, 2022
  2. abhighyaa commented on Oct 10, 2022

    @abhighyaa

    @mdo @julien-deramond This is happening on chrome sandbox as well. Can I raise a PR for the same?

  3. added
    v6
    on Oct 10, 2026
  4. added
    has-pr
    bug
    on Nov 20, 2026
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

    bugcsshas-prv5v6

    Type

    No type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions