I have a table with rowspan="2"
on some th
. I'd like to display a Bootstrap tooltip when the user puts the mouse anywhere on this th
, but there is always some automatic padding, even when I remove the padding. This creates a zone inside the th
that doesn't activate the tooltip.
I'm also using jQuery tablesorter.
th > div {
width: 100%;
height: 100%;
}
.tooltip-th {
margin: -5px;
padding: 5px 0;
}
.table > thead > tr > th {
vertical-align: middle;
}
<html>
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" />
<script src="http://code.jquery.com/jquery-3.1.1.min.js" integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8=" crossorigin="anonymous"></script>
</head>
<body>
<table class="table well table-condensed table-bordered table-hover table-striped sorter">
<thead>
<tr>
<th rowspan="2">
<div data-toggle="tooltip" data-placement="bottom" title="Tooltip test">
Column title
</div>
</th>
<th>
Column title 2
</th>
</tr>
<tr>
<th>
Column title 3
</th>
</tr>
</thead>
</table>
</body>
</html>