Responsive table - How to customize the style of Accordion button for expand and collapse

Responsive table - How to customize the style of Accordion button for expand and collapse

mac2025mac2025 Posts: 1Questions: 1Answers: 0

Hello
I want to replace the accordion button as in attached photo with my own buttons that matches the companies standard. How do i achieve that?

Answers

  • allanallan Posts: 64,210Questions: 1Answers: 10,597 Site admin

    I use a CSS through the ::before pseudo element to create that triangle:

    table.dataTable.dtr-column > tbody > tr > td.dtr-control::before,
    table.dataTable.dtr-column > tbody > tr > th.dtr-control::before,
    table.dataTable.dtr-column > tbody > tr > td.control::before,
    table.dataTable.dtr-column > tbody > tr > th.control::before {
    
    }
    

    Is the full selector. Set the border-width to be 0 and then apply a background image, or content or whatever format it is that you have to display the icon you need.

    I'd suggest right clicking on the the element and selecting "Inspect" to see the CSS that is applied to the element.

    Allan

Sign In or Register to comment.