How to limit the character count of the paragraph text

Instead of showing the whole text paragraph from the post entry, here is how you can limit the character count. Select the text class container/wrapper and apply this CSS snippet.

.class-name {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

Pic of picture frame with a pot of plant on a desk

Related posts

  • CSS codes displayed on monitor screen

    CSS reset basic

    October 6, 2022
    Here is a stripped-down CSS reset code to start the front-end HTML layout. This is just for quick development; otherwise,…
  • Man holding an iPhone in hands

    Prevent overscroll browser behavior

    October 8, 2022
    This CSS snippet prevents that annoying over-scrolling behavior in the browser.
  • Closeup image of laptop

    Quick CSS variable setup

    October 6, 2022
    Here is an example CSS code snippet to setup CSS variables. Expand as you wish.