Replace sorting arrow image with text
Replace sorting arrow image with text
Asher@Fliint
Posts: 5Questions: 2Answers: 0
Hello, I want to replace the sorting arrow image with a simple html (↑ for arrow up and ↓ for arrow down) string. How can this be done?
Bonus question: would I be able to replace the icon with an element? ie. <i class="icon">arrow-up</i>
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
One approach is to use the same method as the Bootstrap integration for DataTables which uses an
:after
pseudo element with:content()
to set the content to display.The Semantic UI integration uses just good old UTF8 characters rather than a font icon like Bootstrap (which to choose it up to you!).
Allan
Thanks for replying
Would you be able to show me exactly how? Sorry I don't know how to do this specifically.
Actually all I need is to know how to remove the sorting icons then and right align the content.
Sure - custom development is covered by the support options.
I would suggest that you modify the CSS that is distributed with DataTables to remove the icons you don't want and then use
th: text-align: right
to align the text as you want.Allan
Awesome got it thanks! Looks so much cleaner
https://fliint.org/hsc-english-advanced/