• Resolved leafarleo

    (@leafarleo)


    Hello,

    I was trying to figure out how to get round corners for the tables, just then I found this code from one of the support questions you had answered. But this one works when I use header and footer in the table.

    .tablepress-id-2 thead th:first-child {
    border-top-left-radius: 10px;
    }
    .tablepress-id-2 thead th:last-child {
    border-top-right-radius: 10px;
    }
    .tablepress-id-2 tfoot th:first-child {
    border-bottom-left-radius: 10px;
    }
    .tablepress-id-2 tfoot th:last-child {
    border-bottom-right-radius: 10px;
    }

    I am using a table without the header and footer. Please can you help me with the code that gives round corners to the table with 6 rows and 2 columns

    Thanks,
    Rafael

    https://wordpress.org/plugins/tablepress/

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

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    If you are not using a header and footer, this could should work:

    .tablepress-id-2 tbody tr:first-child td:first-child {
    border-top-left-radius: 10px;
    }
    .tablepress-id-2 tbody tr:first-child th:last-child {
    border-top-right-radius: 10px;
    }
    .tablepress-id-2 tbody tr:last-child td:first-child {
    border-bottom-left-radius: 10px;
    }
    .tablepress-id-2 tbody tr:last-child td:last-child {
    border-bottom-right-radius: 10px;
    }

    Regards,
    Tobias

    Thread Starter leafarleo

    (@leafarleo)

    Hi Tobias,

    I used a new table to test the above code and I added the below code to add borders (took the below code from one of your post replies)
    .tablepress-id-2 th,
    .tablepress-id-2 td {
    border: 1px solid #dddddd;
    }

    and get the following output on my page. http://toppayingptcsites.net/
    is there something wrong that I might be doing.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    please try again with this:

    .tablepress-id-10 {
      border-collapse: separate;
    }
    .tablepress-id-10 td {
      border: 1px solid #dddddd !important;
    }
    .tablepress-id-10 tbody tr:first-child td:first-child {
    border-top-left-radius: 10px;
    }
    .tablepress-id-10 tbody tr:first-child th:last-child {
    border-top-right-radius: 10px;
    }
    .tablepress-id-10 tbody tr:last-child td:first-child {
    border-bottom-left-radius: 10px;
    }
    .tablepress-id-10 tbody tr:last-child td:last-child {
    border-bottom-right-radius: 10px;
    }

    Regards,
    Tobias

    Thread Starter leafarleo

    (@leafarleo)

    Awesome, the above code worked. All four sides are round corner now. I liked TablePress very much, working just as expected.

    I just changed the th:last-child to td:last-child, coz i’m not using the header.

    Thank you so much for your help.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! πŸ™‚ Good to hear that this helped!
    Yes, the th was a typo. td is correct. Nice find!

    Best wishes,
    Tobias

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

    Tobias, Thanks for all your help on your website and this forum. I am trying to figure out how to get rounded corners and it is not working. Any suggestions – http://roadguardians.org/test-6-18/

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi Megan,

    it as actually, there’s just an extra border that needs to be removed. Please also add this to the “Custom CSS”:

    .entry .tablepress {
      border: none;
    }

    Regards,
    Tobias

    Thanks!

    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 leafarleo

    (@leafarleo)

    Hi Tobias,

    Is it possible to have round corners for individual cells in a table.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    You probably mean something like this

    .tablepress-id-123 {
      border-collapse: separate;
      border-spacing: 5px;
    }
    .tablepress-id-123 td {
      border: 1px solid #dddddd;
      border-radius: 10px;
    }

    (with the table ID adjusted).

    Regards,
    Tobias

    Thread Starter leafarleo

    (@leafarleo)

    Thanks Tobias, I am getting the round corners for all the cells in the table, but the first row top border does not appear, do I have write a separate code for the top border.

    Something like:
    .tablepress-id-123 .row-1 .column-1,
    .tablepress-id-123 .row-1 .column-2 {
    border-top: 1px solid #583759 !important;
    }

    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 leafarleo

    (@leafarleo)

    Here is the table where the top border in the first row does not appear.
    http://toppayingptcsites.net/

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for the link!
    It should be enough to extend the line

    border: 1px solid #dddddd;

    from the code that I pasted above to

    border: 1px solid #dddddd !important;

    Regards,
    Tobias

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘Round Corners Tables without header and footer’ is closed to new replies.