Note: I am sharing this answer to present a different method of adding arrows without using an image, while still maintaining the design style of the arrows in the background.
Here is a way to incorporate the arrows without relying on an image. This approach allows for easy customization of the arrow colors using classes. By separating the two arrows into individual divs, you can even hide one when it's already selected (currently they change color independently on hover).
Check out the example live!
HTML
<table class="test-table">
<tr class="headRow">
<th>
<div class="table-head-container">
<div class="table-head-background">
<div class="right-text">
<div class="small-frame">
<div class="up-arrow">▲</div>
<div class="down-arrow">▼</div>
</div>
</div>
</div>
<div class="Col-header">First</div>
</div>
</th>
<th>
<div class="table-head-container">
<div class="table-head-background">
<div class="right-text">
<div class="small-frame">
<div class="up-arrow">▲</div>
<div class="down-arrow">▼</div...
CSS
.table-head-container {
position: relative;
color: white;
max-width: 100px;
}
.test-table {
border: solid black 1px;
}
.headRow {
background-color: green;
color: white;
}
.headRow > th {
border: solid black 2px;
padding: 10px 20px 10px 5px;
min-width:100px;
font-size: 1.6em
}
.evenRow {
background-color: #E8E8E8;
}
table {
border-collapse: collapse;
}
tr > td {
border: solid black 1px;
padding: 5px;
}
.Col-header {
text-align: left;
}
.table-head-background {
position: absolute;
top: -10;
left: 15;
bottom: 0;
right: 0;
z-index: 1;
width: 0;
color: white;
background-color:green;
}
.table-head-background > .right-text {
text-align: right;
}
.table-head-background > .right-text > .small-frame {
position: absolute;
left: 80px;
width: 5px !important;
word-wrap: break-word;
}
.table-head-background > .right-text > .small-frame > .up-arrow, .table-head-background > .right-text > .small-frame > .down-arrow {
font-size: .8em;
}
.table-head-background > .right-text > .small-frame > .up-arrow:hover, .table-head-background > .right-text > .small-frame > .down-arrow:hover {
color: blue !important;
}