Title: #colspan# causing issues
Last modified: September 1, 2017

---

# #colspan# causing issues

 *  Resolved [zacfor](https://wordpress.org/support/users/zacfor/)
 * (@zacfor)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/colspan-causing-issues/)
 * 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, 8 months ago by [zacfor](https://wordpress.org/support/users/zacfor/).

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

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/colspan-causing-issues/#post-9470042)
 * 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](https://wordpress.org/support/users/zacfor/)
 * (@zacfor)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/colspan-causing-issues/#post-9470535)
 * That makes sense. We’ll tweak our styling.
 * Thanks!
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/colspan-causing-issues/#post-9470612)
 * 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.

 * ![](https://ps.w.org/tablepress/assets/icon.svg?rev=3192944)
 * [TablePress - Tables in WordPress made easy](https://wordpress.org/plugins/tablepress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/tablepress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/tablepress/)
 * [Active Topics](https://wordpress.org/support/plugin/tablepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/tablepress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/tablepress/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [8 years, 8 months ago](https://wordpress.org/support/topic/colspan-causing-issues/#post-9470612)
 * Status: resolved