How I adjust the location of the ColVis filter button?

How I adjust the location of the ColVis filter button?

ShatnerShatner Posts: 2Questions: 1Answers: 0

Hello everyone.

I am wondering how I would set the location of the ColVis filter button.

https://www.datatables.net/release-datatables/extensions/ColVis/examples/simple.html

For example, the show/hide columns button is on a different level as the search and show entries. What if I wanted them on the same level?

Thank you.

This question has an accepted answers - jump to answer

Answers

  • AshbjornAshbjorn Posts: 55Questions: 2Answers: 16
    edited July 2015 Answer ✓

    Shatner,

    In that page the ColVis element is placed before a div element with a class value of clear. Meaning it creates a block element that does not accept content on either side, thus pushing any following element on a new "row".

    If you remove this part from the "dom" property: <"clear">

    Then the button will be placed on the same line, if space permits. You are free to apply your own styling to position it where you want.

    Hope this helps,

  • ShatnerShatner Posts: 2Questions: 1Answers: 0

    Thank you, Ashbjorn.

    This solves the problem.

This discussion has been closed.