• Resolved doktorodd

    (@doktorodd)


    Hello!

    I’ve been trying to align the table to the left side of the page, but I can’t seem to figure it out. I can only find information about aligning the text but not the entire table, I would appriciate any help!

    The custom CSS so far:
    .tablepress .column-2 {
    width: 75px;
    }

    .tablepress .column-1 {
    width: 100px;
    }

    .tablepress .column-2 {
    padding: 2px;
    }

    .tablepress .column-1 {
    padding: 2px;
    }

    .entry-content .tablepress {
    width: auto;
    margin: 0 auto 1em;
    }

    And here is a link to the relevant page:
    https://truckuthyrning.nu/motviktstruckar/30-ton/

    Thanks in advance!

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

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    You are explicitly telling the browser to center the table, with the CSS command

    .entry-content .tablepress {
      width: auto;
      margin: 0 auto 1em;
    }

    If you remove that, the table will be left aligned (and wider).

    Regards,
    Tobias

    Thread Starter doktorodd

    (@doktorodd)

    Thank you for the fast response!

    Yes I was worried that this would be the cause.
    I would like it to be the same size it is now but left aligned, is there any solution to this or do I have to choose between a full sized table and a small centered table?

    Thanks again.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    then, just use this modified version:

    .entry-content .tablepress {
      width: auto;
    }

    This will reduce the size but keep the table on the left.

    Regards,
    Tobias

    Thread Starter doktorodd

    (@doktorodd)

    Thank you for your help, Tobias, this solved my issue!
    I am a bit embarrased that it was such an easy fix but my knowledge of CSS is very limited.
    Thank you, again!

    Plugin Author TobiasBg

    (@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 doktorodd

    (@doktorodd)

    Yes, of cource, I was searching for the review page yesterday! Thanks.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks, I really appreciate it!

    Best wishes,
    Tobias

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Left align the table, not the text’ is closed to new replies.