• Resolved mohammadia

    (@mohammadia)


    Hi,

    I can see in the default theme that there are no outside borders, but when I am adding the table, outside borders are being created and added to the table.

    View post on imgur.com

    Why? How can I remove it?

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

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    This indicates that they are added by your theme. 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 mohammadia

    (@mohammadia)

    Sure.

    https://www.settleoutdoor.com/snorkeling-vs-scuba-diving-the-definitive-guide/

    + I have included the CSS code for the table to be aligned center but that too isnt happening.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    to remove the vertical borders, please also add

    .tablepress,
    .tablepress tr,
    .tablepress th,
    .tablepress td {
        border-left: none !important;
        border-right: none !important;
    }

    to the “Custom CSS”.

    Regarding the centering: I’m not sure what you mean. The table is stretching to 100% of the content area. It will not extend further to the right (just like your text won’t), because this is the space for the sidebar.

    Regards,
    Tobias

    Thread Starter mohammadia

    (@mohammadia)

    Hi Tobias

    Just to be sure , I want the inner grids, just want the outer border to removed. Can that be done ?

    I want the table to be centre aligned.

    Thread Starter mohammadia

    (@mohammadia)

    + Why does the edit link for the table appear in the post?

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    ok, then please use

    .tablepress,
    .tablepress th:first-child,
    .tablepress td:first-child {
        border-left: none !important;
    }
    .tablepress,
    .tablepress th:last-child,
    .tablepress td:last-child {    
        border-right: none !important;
    }

    What do you mean with “center aligned” here? The text inside the table cells? Or the table on the page?

    The “Edit” screen is only shown for you, when you are logged-in. It’s not visible for regular visitors.

    Regards,
    Tobias

    Thread Starter mohammadia

    (@mohammadia)

    Both, the text inside the table cells and the table on the page?

    Thread Starter mohammadia

    (@mohammadia)

    What is the difference in both codes?

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    the second chunk of code removes the border from the left and right of the outside cells only.

    For centering the text in the cells, please try

    .tablepress thead th,
    .tablepress tbody td {
      text-align: center;
    }

    Centering the table on the page is not really possible here. The table is already using all the space of the container that it is in (so technically, it is centered). Having it more on the right is not directly possible, because that space is reserved for your sidebar, by the theme.

    Regards,
    Tobias

    Thread Starter mohammadia

    (@mohammadia)

    Thanks a lot Tobias !

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

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

    Best wishes,
    Tobias

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Table Order’ is closed to new replies.