Skip to content

Instantly share code, notes, and snippets.

@DominicWatts
Last active March 24, 2023 16:24
Show Gist options
  • Save DominicWatts/904f6a28455dd2d0b33179468b7a782c to your computer and use it in GitHub Desktop.
Save DominicWatts/904f6a28455dd2d0b33179468b7a782c to your computer and use it in GitHub Desktop.
css equal heights
/* Set a height */
/* Ellipsis to one line text */
.equal {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
/* Ellipsis to multiline text */
.equal {
text-overflow:ellipsis;
overflow:hidden;
/* Addition lines for 2 line or multiline ellipsis */
display: -webkit-box !important;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
white-space: normal;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment