• Resolved doriefish

    (@doriefish)


    Hello,

    Thank you for your plugin and help files. I am trying to use the block function for my table that has 3 columns. I am using this code:

    .tablepress-id-2 tbody tr {
    display: block;
    border: 2px solid #868686;
    margin-bottom: 5px;
    }

    It looks nice around the first table on the page, however it pushes the text to the left.

    I would like the text to appear more like the second table, within it’s columns / more spaced out.

    Are you able to make a suggestion to help me please?

    Thank you ??

    The page I need help with: [log in to see the link]

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

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    What are you actually trying to achieve with the display: block; part? Do you want the rows to be separated? For that, I’d recommend using CSS like

    .tablepress-id-3 {
        border-collapse: separate;
        border-spacing: 0 10px;
    }

    Then, the actual border would have to be added to the table cells (td elements).

    Regards,
    Tobias

    Thread Starter doriefish

    (@doriefish)

    Hi Tobias,

    No trouble, your support is amazing! All working and looking lovely thank you.

    For anyone else looking at this the code I used is below – to achieve a block look table with white space in-between the rows: https://snipboard.io/dFs3pe.jpg

    .tablepress-id-5 {
    	border-collapse: separate;
    	border-spacing: 0 10px;
    }
    
    .tablepress-id-5 tbody td {
    	vertical-align: middle;
    	border-bottom: 2px solid #868686;
    	border-top: 2px solid #868686 !important;
    }
    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!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Alignment of text with a block’ is closed to new replies.