DEV Community

Nagarajan R
Nagarajan R

Posted on

Answer: Add sorting arrows to <th> like table sorter

The best solution without images, pure CSS. Just put the classnames headerSortDown and headerSortUp on the td or th rows and the caret will appear.

table td,
table th {
  border: 1px solid silver;
}

.headerSortDown:after,
.headerSortUp:after {
  content: ' ';
  position: relative;
  left: 2px;
  border:

Top comments (0)