Skip to content

Instantly share code, notes, and snippets.

@ohmrefresh
Created October 6, 2014 10:50
Show Gist options
  • Save ohmrefresh/5440c598fa95e77bb2f1 to your computer and use it in GitHub Desktop.
Save ohmrefresh/5440c598fa95e77bb2f1 to your computer and use it in GitHub Desktop.
CSS Max line in DIV
.text {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
line-height: 16px;
max-height: 32px;
-webkit-line-clamp: 2; /* number of lines to show */
-webkit-box-orient: vertical;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment