Datatables Sort Arrow Position

Datatables Sort Arrow Position

st4rbuck2013st4rbuck2013 Posts: 8Questions: 3Answers: 0

OK so, I understand that DataTables has predefined picture for the arrows. However, I can't move it or remove it. I want to retain the sorting option. If i upload a new background arrow, the original arrow still shows.

I'm new, so sorry if my questions aren't that great. I've looked through CSS code examples to reposition the arrow, and I've tried them, to no avail. So is some other code overriding this? Again, thanks for everyone's time.

https://live.datatables.net/tojoyini/1/edit

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,679Questions: 1Answers: 10,498 Site admin
    Answer ✓

    I've done it a few different ways over the years. In that version it uses UTF8 characters: ▼ and ▲.

    If you don't want them, use:

    table.dataTable thead > tr > th::before,
    table.dataTable thead > tr > th::after {
      display: none !important;
    }
    

    https://live.datatables.net/tojoyini/2/edit

    Allan

  • st4rbuck2013st4rbuck2013 Posts: 8Questions: 3Answers: 0

    Wow. Thank you Allan! Just got back from work and that worked perfectly. Thanks as always, hope this helps others.

    Cheers

Sign In or Register to comment.