Replace sorting arrow image with text

Replace sorting arrow image with text

Asher@FliintAsher@Fliint Posts: 5Questions: 2Answers: 0
edited August 2016 in Free community support

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

Answers

  • allanallan Posts: 63,812Questions: 1Answers: 10,516 Site admin

    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

  • Asher@FliintAsher@Fliint Posts: 5Questions: 2Answers: 0

    Thanks for replying :)

    Would you be able to show me exactly how? Sorry I don't know how to do this specifically.

  • Asher@FliintAsher@Fliint Posts: 5Questions: 2Answers: 0

    Actually all I need is to know how to remove the sorting icons then and right align the content.

  • allanallan Posts: 63,812Questions: 1Answers: 10,516 Site admin
    Answer ✓

    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

  • Asher@FliintAsher@Fliint Posts: 5Questions: 2Answers: 0

    Awesome got it thanks! Looks so much cleaner
    https://fliint.org/hsc-english-advanced/

This discussion has been closed.