Topic: Align of sort icon
punchbyte_boot premium asked 1 year ago
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?
Marcin Luczak staff answered 1 year ago
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
::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
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
- User: 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