Support » Plugin: TablePress » Table length and search box positions

  • Resolved cezarmr

    (@cezarmr)


    Hi,

    One more question. How to chenge divs dataTables_filter and dataTables_length, so they be the other way round?
    First search bar, second table length box.

    • This topic was modified 1 year, 11 months ago by cezarmr.
    • This topic was modified 1 year, 11 months ago by cezarmr.
Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    For this, you can use CSS code. For example, add this to the “Custom CSS” textarea on the “Plugin Options” screen of TablePress:

    .dataTables_length {
        float: right;
    }
    .dataTables_filter {
        float: left;
    }

    Regards,
    Tobias

    Ok then, but I also want search bar and ColumnFilterWidgets to be in the same line.

    I’ve made change:

    .column-filter-widgets {
            float: left;
    	width: 60%;
    }

    and

    .dataTables_filter {
    	float: left; 
    	width: 30%;
    }
    .dataTables_length {
        float: right;
    }

    But unfortunately it doesn’t work because table length box is still first in order…

    • This reply was modified 1 year, 11 months ago by cezarmr.
    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    Can you please post a link to the page with the table where this problem happens, so that I can take a direct look? Thanks!

    Regards,
    Tobias

    Any help?
    Where it possibly can be changed in code (not css)?

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    this CSS actually works for me:

    .column-filter-widgets {
    	float: left;
    	width: 35%;
    }
    .dataTables_filter {
    	float: left;
    	width: 30%;
    }
    .dataTables_length {
    	float: right;
    	width: 27%;
    }

    Regards,
    Tobias

    Hi,

    For me it works only if search bar and length box are in the same lane.

    I would like to have two column filter widgets and search bar in one line and length box in second line.

    With your code two column filter widgets are in two lines.
    If I change amount of width you proposed then search bar goes to second line first insted of length box…

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    you might have to change the HTML position of the two elements then, by adding this to the “Custom Commands” text field on the table’s “Edit” screen:

    "dom": "flrtip"
    

    After that, you should be able to achieve what you want by playing with the widths in the CSS.

    Regards,
    Tobias

    Hi,

    It made it’s job, but unfortunately also made ColumnFilterWidgets disappear… :/

    OK, I got it.

    "dom": "fWlrtip"

    Found it in your code.

    Thank you for help. 🙂

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    ah, sorry, yes, we will of course need the W in there as well 🙂 Sorry about missing that!

    Best wishes,
    Tobias

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Table length and search box positions’ is closed to new replies.