• Resolved mike2017

    (@mike2017)


    Hi.

    I use Zerif Lite Theme and WP 4.7.3 (Spanish)

    I have been trying all previus forums asked questions and i cannot figure out how to center my table nothing is working for me.

    My table link:

    http://calculistaestructural.com/pago-111220/

    The code:

    .tablepress-id-2 .column-1 {
    width: 600px;
    }

    .tablepress-id-2 .column-1 {
    text-align: center;
    }

    .tablepress-id-2 {
    width: auto;
    margin: 0 auto 1em;
    }

    .tablepress {
    width: auto;
    margin: 0 auto 1em !important;
    display: table !important;
    }

    I also tried with unchecking the horizontal scroll in the edit menu as a read in others post, it did not work.

    Thank you.

    • This topic was modified 9 years ago by mike2017.
Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    As you have turned off all individual features anyway, please uncheck the “Use DataTables” checkbox for this table.
    Then, please also remove the block

    .tablepress {
      width: auto;
      margin: 0 auto 1em !important;
      display: table !important;
    }

    from your “Custom CSS”.

    Regards,
    Tobias

    Thread Starter mike2017

    (@mike2017)

    It works! Thank you Tobias! You are the best!

    Thread Starter mike2017

    (@mike2017)

    Tobias.

    One more question. Is there anyway i can reduce the spaces in the last row?

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! 🙂 Good to hear that this helped!

    The space in the last row is the result of the HTML code containing line breaks. This results in HTML <br /> tags being added automatically. You could either remove all line breaks or change the used Shortcode to
    [table id=2 convert_line_breaks=false /]

    Best wishes,
    Tobias

    Thread Starter mike2017

    (@mike2017)

    Hi Tobias. Thanks, it work. But now the html code inside row 10 in not center. What could i do to center it? Thanks again!

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    I suggest to add this to the “Custom CSS”:

    .tablepress form {
    	line-height: 10px;
    }
    .tablepress form input {
    	display: block;
    	margin: 0 auto;
    }

    Regards,
    Tobias

    Thread Starter mike2017

    (@mike2017)

    Thank you Tobias!! You are the best!!

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! 🙂 Good to hear that this helped!

    Best wishes,
    Tobias

    P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!

    Thread Starter mike2017

    (@mike2017)

    Yes. I will! Thanks.

    Tobias, i have another problem. I did a second table, html code in last row is off center.

    First Table: http://calculistaestructural.com/pago-111220/

    Second Table: http://calculistaestructural.com/pago-111221/

    I need to table because is for diferent countries.

    Thanks!!

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    please add this to the “Custom CSS” as well:

    .tablepress .aligncenter {
      margin: 0 auto;
    }

    Regards,
    Tobias

    Thread Starter mike2017

    (@mike2017)

    Thank you Tobias!

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! 🙂 Good to hear that this helped!

    Best wishes,
    Tobias

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘TablePress – Center Table’ is closed to new replies.