How to avoid unwanted responsive layout

How to avoid unwanted responsive layout

AndreasInfoAndreasInfo Posts: 4Questions: 1Answers: 0
edited January 2020 in Free community support

Hi,

first of all, thanks for the tool, I really like it. I am a beginner in programming and I have an issue which I can't find. I use Bootrap4 with your table and I keep everything simple. Without anything adding there seems to be a breakpoint at 767px, where the searchbar (footer --> e.g. "0 - 10 results from 12") will jump to right (left). How can I avoid that (let's stay both in the middle). Furthermore I want the pagination always in the middle under the footer.

The documentation for layout get's an 404 error.

Thank you in advance


Answers

  • colincolin Posts: 15,237Questions: 1Answers: 2,598

    We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

  • AndreasInfoAndreasInfo Posts: 4Questions: 1Answers: 0

    Hi Colin,
    thank you for your help. I created a test case here.
    https://jsfiddle.net/uae8Lxo6/5/

    Thank you very much,
    Andreas

  • allanallan Posts: 63,205Questions: 1Answers: 10,415 Site admin

    The documentation for layout get's an 404 error.

    Where is the link to that please? There is a layout option for DataTables 2, but that's under development...

    You could use:

    @media screen and (max-width: 767px) {
      div.dataTables_wrapper div.dataTables_paginate ul.pagination {
        justify-content: center !important;
      }
    }
    

    to align the paging control to the center - example.

    I think we should probably include that in our own CSS. I'll create an issue for that.

    Allan

  • AndreasInfoAndreasInfo Posts: 4Questions: 1Answers: 0

    Thank you. It works for now. Some custom left, right, center etc. for the search-bar, the pagination-button and the pagination-note would be appreciated. Still a great tool though.
    The 404 I got was at https://datatables.net/reference/option/layout.

    Thanks
    Andreas

  • colincolin Posts: 15,237Questions: 1Answers: 2,598

    Yep, that 404 would be expected, that's not a valid page. Was that linked from somewhere on our site?

    Colin

  • AndreasInfoAndreasInfo Posts: 4Questions: 1Answers: 0

    Yes, when I was searching for "layout" it was the first result.
    See photo attached.

  • allanallan Posts: 63,205Questions: 1Answers: 10,415 Site admin

    Thank you - that has sneaked in from the 2 branch. I've removed it from the search results now. The layout option in v2 will make layout control so much easier than the dom option!

    Allan

This discussion has been closed.