Skip to content

Instantly share code, notes, and snippets.

@lorenzosinisi
Created October 13, 2015 14:19
Show Gist options
  • Save lorenzosinisi/7ce2bd8e3395555912c0 to your computer and use it in GitHub Desktop.
Save lorenzosinisi/7ce2bd8e3395555912c0 to your computer and use it in GitHub Desktop.
Truncate text with ony CSS
.btn.btn-default {
min-width: 112px;
width: 116px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
.btn.btn-danger {
min-width: 112px;
width: 116px;
text-overflow: ellipsis; // This is where the magic happens :)
white-space: nowrap;
overflow: hidden;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment