Styling the Covis dropdown

Styling the Covis dropdown

barraclmbarraclm Posts: 10Questions: 1Answers: 0

My site is "https://michaelbarraclough.uk/test/datatables.html". I have managed to style the border, text colour (when the column is active) and background colour for the ('covis') dropdown (top right hand corner). However, I would also like to put more space between the column text descriptor and the tick which shows that the column is active. Any pointers on how to achieve this would be much appreciated. Less important, but a nice to have would be the ability to control the colour of the column text descriptor when the column is in-active.

Michael Barraclough

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 21,841Questions: 26Answers: 5,049
    Answer ✓

    I would also like to put more space between the column text descriptor and the tick which shows that the column is active.

    Right click on one of the columns and you will find this for the active columns:

    div.dt-button-collection .dt-button-active:after {
        position: absolute;
        top: 50%;
        margin-top: -10px;
        right: 1em;
        display: inline-block;
        content: "✓";
        color: inherit;
    }
    

    Try changing right: 1em; to a decimal number like right: 0.5em;. You should see real time what affect the change has.

    Do the same thing with the Active text, something like this:

    .dt-button.buttons-columnVisibility, .dt-button.buttons-columnVisibility.dt-button-active {
        color: green;
        margin-right: 2rem;
    }
    

    I changed the color from black to green with the above.

    Kevin

Sign In or Register to comment.