"Truncate text tooltip"
Bootstrap 4.1.1 Snippet by encryptedalpha

<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div class="email-tooltip">asdfasdfasdfasdfasdfasdfasdf</div> <div class="email-hover-tooltip">asdfasdfasdfasdfasdfasdfasdf</div>
.email-tooltip { white-space: nowrap; width: 80px; overflow: hidden; text-overflow: ellipsis; position: relative; pointer-events:none; } .email-tooltip:after { content:""; display: block; position: absolute; top: 0; left: 0; width: 100%; height: 48px; z-index: 1; pointer-events:initial; } .email-tooltip:hover:after{ cursor: pointer; } .email-hover-tooltip { width: auto; position: absolute; display: none; background-color: #fff; padding: 2px 4px; -webkit-box-shadow: 0 0 50px 0 rgba(0,0,0,0.3); opacity: 0; transition: opacity 0.5s ease; } .email-tooltip:hover + .email-hover-tooltip { display: block; transition: opacity 0.5s ease; opacity: 1; }

Related: See More


Questions / Comments: