Download
We're evolving to serve you better! This current forum has transitioned to read-only mode. For new discussions, support, and engagement, we've moved to GitHub Discussions.

Extra lines in tables in Square template

  • #10771
    Avatar photo[anonymous]

    Hello,

    I’m new(ish) to Publii, so apologies if I’m doing something wrong here. I created a table in Publii and it looks fine in Publii, but when synced and viewed in the browser, the tables have an extra box to the right.

    This how the table looks like in Publii:

    https://www.dropbox.com/scl/fi/c74fcmi54sm1j7eql8iff/publii-editor-table-issue-view-in-editor.png?rlkey=yw60fd0d60q5pc5pxiyx2hbig&dl=0

    And this is how it looks in the browser:

    https://www.dropbox.com/scl/fi/d8om4u1rrjtcwrw154m40/publii-editor-table-issue-view-in-browser.png?rlkey=6cnb84srjhcebd0p2hy6ggg3t&dl=0

    I’m using Ubuntu Linux 22.04 with Publii 0.43.1 and the Square (v2.4.1.0) template.

    The HTML code generated by Publii looks perfectly fine (copied the HTML for the first table at the bottom of this text)

    Is there a way of removing the extra lines from the right of the table?

    Many thanks,

    Damian

    HTML for table:

    <table style=”border-collapse: collapse; width: 100%;” border=”1″>
    <tbody>
    <tr>
    <td style=”width: 20%;”>dg</td>
    <td style=”width: 20%;”>dh</td>
    <td style=”width: 20%;”>h</td>
    <td style=”width: 20%;”>h</td>
    <td style=”width: 20%;”>c</td>
    </tr>
    <tr>
    <td style=”width: 20%;”>s</td>
    <td style=”width: 20%;”>s</td>
    <td style=”width: 20%;”>f</td>
    <td style=”width: 20%;”>fgh</td>
    <td style=”width: 20%;”>fgh</td>
    </tr>
    </tbody>
    </table>
    
    #10772
    Avatar photo[anonymous]

    Hm, try adding `display: table` to the inline style or `table{display:table;}` to your custom CSS.

    #10773
    Avatar photo[anonymous]

    That is brilliant! Fixed it. Thank you so much for replying

    🙂

    #10774
    Avatar photo[anonymous]

    This happened because the Square theme has `display: block` set for the table element. Not sure why, seems pretty weird.