• Resolved calle81

    (@calle81)


    With this css I change the next and previous style of the id 1 table.

    a#tablepress-1_next {
    color: green!important;
    font-weight: bold;
    font-size: larger;
    background: transparent;
    }

    a#tablepress-1_previous {
    color: red!important;
    font-weight: bold;
    font-size: larger;
    background: transparent;
    }

    How to apply this next and previous style to all tables and not just id 1?

    Thanks.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi!

    Thanks for your post and sorry for the trouble!

    To apply this to all these buttons of all tables, please use

    .dataTables_wrapper .paginate_button.next {
      color: green!important;
      font-weight: bold;
      font-size: larger;
      background: transparent;
    }
    .dataTables_wrapper .paginate_button.previous {
      color: red!important;
      font-weight: bold;
      font-size: larger;
      background: transparent;
    }

    Regards,
    Tobias

    Thread Starter calle81

    (@calle81)

    @tobiasbg thanks

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    sure, no problem ??

    Best wishes,
    Tobias

    Thread Starter calle81

    (@calle81)

    @tobiasbg I tried your code, but it doesn’t change my color. Looking at the Google console it tells me that the green or red color change is not applied because #333!important is already defined in another class.

    Thanks.

    • This reply was modified 11 months, 2 weeks ago by calle81.
    Thread Starter calle81

    (@calle81)

    Console css: https://ibb.co/2S3SRF5

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    it looks like you have another plugin that’s loading CSS code for DataTables as well.

    With more specific CSS selectors, you should however be able to get around that:

    .dataTables_wrapper .dataTables_paginate .paginate_button.next {
      color: green!important;
      font-weight: bold;
      font-size: larger;
      background: transparent;
    }
    .dataTables_wrapper .dataTables_paginate .paginate_button.previous {
      color: red!important;
      font-weight: bold;
      font-size: larger;
      background: transparent;
    }

    Regards,
    Tobias

    Thread Starter calle81

    (@calle81)

    @tobiasbg Thanks for your time, but it still doesn’t work ??

    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

    Thread Starter calle81

    (@calle81)

    @tobiasbg solved

    .dataTables_wrapper .dataTables_paginate .paginate_button.paginate_button.next {
    color: green!important;
    font-weight: bold;
    font-size: larger;
    background: transparent;
    }
    .dataTables_wrapper .dataTables_paginate .paginate_button.paginate_button.previous {
    color: red!important;
    font-weight: bold;
    font-size: larger;
    background: transparent;
    }

    Thnaks

    • This reply was modified 11 months, 2 weeks ago by calle81.
    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    cool! Great to hear that you found a solution! So the CSS selectors needed even more specificity it looks like!

    Best wishes,
    Tobias

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘how to apply this next and previous css style to all tables?’ is closed to new replies.