• Resolved Jocce

    (@jocce)


    I have a few “center over collums” in an Excel-sheet (Mostly Titles for Sections).

    This makes the Table look weird (it takes to much space).

    Is there a way to fix this?

    /Jocce

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    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 Jocce

    (@jocce)

    @tobiasbg

    https://svenco.se/?cmp_bypass=svenconew

    Under “Produkter” click on “Test Artikel”

    /Jocce

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for the link!

    This setting from Excel is not imported, so that you have to combine the cells again manually, using the colspan button below the table input fields.
    However, note that you will then have to turn off the “Use DataTables” checkbox as the JavaScript library does not work in tables that such combined cells.

    Regards,
    Tobias

    Thread Starter Jocce

    (@jocce)

    @tobiasbg
    Thank you.
    That is kind of a problem. Without Data Tables the table is not searchable, and that was one of the main reasons for me to use this table.

    Any workaround for this?
    (The colspan cells does not have to be included in the search)

    /Jocce

    Thread Starter Jocce

    (@jocce)

    Next question; Can I somehowe decide that some rows should have the data / text centered and some left-or right?

    /Jocce

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    unfortunately, it’s not possible to use colspan and the JavaScript functions at the same time. This is a limitation of the external library (that was not written by me) and there is no way to change that at the moment, sorry ?? You will have to decide what’s more important for you.

    To have a different text alignment, you can use CSS code. For example, add this to the “Custom CSS” textarea on the “Plugin Options” screen of TablePress:

    .tablepress-id-2 .row-9 td {
      text-align: center;
    }
    .tablepress-id-2 .row-15 td {
      text-align: right;
    }

    You might also want to prevent automatic line breaks in some columns (even though your table will then be too wide, due to the small content area of your theme):

    .tablepress-id-2 tbody td {
      white-space: nowrap;
    }

    Regards,
    Tobias

    Thread Starter Jocce

    (@jocce)

    Thank you! ??

    /Jocce

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    no problem ?? Always happy to help!

    Best wishes,
    Tobias

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Center over collumns’ is closed to new replies.