csspoo

Search

Tags

  • Animation 1
  • Hover 2

Feed

RSS2.0
  • 2020-06-14

    Truncate string with ellipsis

    Author

    Jens Törnell

    Comments

    Start a discussion

    Full page

    <div>Tootsie roll pastry.</div>
    div {
      width: 100px;
      background: #eee;
    
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
    }

    Sources

    • https://developer.mozilla.org/en-US/docs/Web/CSS/text-overflow

    If you like this post, please share it! Tweet this!

  • Write for us
  • Contact us
  • About
  • License
Copyright © 2019

This page uses cookies for Google Analytics.