Last active
March 24, 2023 16:24
-
-
Save DominicWatts/904f6a28455dd2d0b33179468b7a782c to your computer and use it in GitHub Desktop.
css equal heights
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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