Topic: Align of sort icon
punchbyte_boot premium asked 2 years ago
Hello,
in datatables i wish to align the header and content to the right (because content is numbers). This is functioning with using the class "text-right".
But the sort icon (arrow) allways is set on the left of the row, with a wide space between arrow an header-text.
How can i have an alignment for sort icons?
Best regards
Patrick
Marcin Luczak staff answered 2 years ago
Hi,
There is no method or class to align only sort icon for the table head element, as it is placed as a content of its ::before
and ::after
pseudoelements. To achieve what you want, you can use .table thead .sorting::after
and .table thead .sorting::before
selectors and change theirs left/right properties to align arrows to your need.
Keep coding, Marcin
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Premium
- Premium support: Yes
- Technology: MDB jQuery
- MDB Version: MDB4 4.20.0
- Device: PC
- Browser: Mozille
- OS: Win 10
- Provided sample code: No
- Provided link: No