• Resolved zacfor

    (@zacfor)


    We’re noticing a strange bug(?) when using the #colspan# tag to center some text within a row. It behaves exactly as it should except for some reason the div containing the table disappears.

    We have three tables on this page, and only the one with the #colspan#s behaves this way.

    The other two look something like this:

    <div class="our-custom-wrapper>
       <h2 class="tablepress-table-name tablepress-table-name-id-30">
       <div id="tablepress-30_wrapper">
          <table id="tablepress-30">
       ...
    

    The one with the #colspan#s looks like this (missing the wrapping div):

    <div class="our-custom-wrapper>
       <h2 class="tablepress-table-name tablepress-table-name-id-32">
       <table id="tablepress-32">
       ...
    

    This missing wrapping div is causing and issue with the styling, and I’m trying to figure out why it goes away when we add the #colspan#s

    Is this a known bug or have we done something incorrectly?

    Thanks!

    • This topic was modified 8 years, 6 months ago by zacfor.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble. Also, sorry for the late response. I was on holidays and could not answer earlier.

    This wrapping <div> is added by the DataTables JavaScript library (which also offers the sorting, searching, etc. features).
    This JS library however does not work on tables that have combined cells (using #colspan# or #rowspan#). So, for tables that have this, you should uncheck the “Use DataTables” checkbox (so that you don’t get script errors).

    In addition, using that <div> for styling should not really be necessary, if you structure your CSS code differently. If you really want a wrapper, you’d need to add it manually, by adding HTML around the Shortcode, i.e.`
    <div class=”your-class”>[table id=123 /]</div>
    `

    Regards,
    Tobias

    Thread Starter zacfor

    (@zacfor)

    That makes sense. We’ll tweak our styling.

    Thanks!

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

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

    Best wishes,
    Tobias

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘#colspan# causing issues’ is closed to new replies.