Title: Adding table to a container
Last modified: August 31, 2016

---

# Adding table to a container

 *  Resolved [lamccray](https://wordpress.org/support/users/lamccray/)
 * (@lamccray)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/adding-table-to-a-container/)
 * Hello-
 * I an trying to add a tablepress table to another plugin but for some reason the
   header is not extending to the width of the container. It was able to get it 
   work for a while but since installing the responsive add on i’ve been experiencing
   this issue. Is there a way for me to fix this? If you need to see an example 
   I will need to send you the page separately as it needs to remain private to 
   the public.
 * Thanks!
 * [https://wordpress.org/plugins/tablepress/](https://wordpress.org/plugins/tablepress/)

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

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/adding-table-to-a-container/#post-7151418)
 * Hi,
 * thanks for your post, and sorry for the trouble.
 * This is likely caused by a recent problem with the Horizontal Scrolling feature
   of the DataTables JS library. I suggest that you uncheck that checkbox on the
   table’s “Edit” screen.
 * As an alternative, you could then use the scroll mode of the Responsive Tables
   Extension from [https://tablepress.org/extensions/responsive-tables/](https://tablepress.org/extensions/responsive-tables/)
 * Regards,
    Tobias
 *  Thread Starter [lamccray](https://wordpress.org/support/users/lamccray/)
 * (@lamccray)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/adding-table-to-a-container/#post-7151444)
 * Thanks! I tried it with my existing code [table id=1 responsive=scroll datatables_scrolly
   =500px /] and it did not fix the header (although I changed the table properties).
   The header would only appear correctly with the following code: [table id=1 responsive
   =scroll]. Is there a way to also enable horizontal scrolling and not screw up
   the headers?
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/adding-table-to-a-container/#post-7151445)
 * Hi,
 * Can you please post a link to the page with the table where this problem happens,
   so that I can take a direct look? (You can also email it to me, the address is
   in the main plugin file “tablepress.php”.) Thanks!
 * Regards,
    Tobias
 *  Thread Starter [lamccray](https://wordpress.org/support/users/lamccray/)
 * (@lamccray)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/adding-table-to-a-container/#post-7151447)
 * I cannot post a link as it has to remain private. I will send in a separate email.
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/adding-table-to-a-container/#post-7151456)
 * Hi,
 * sounds good! I’ll take a look then.
 * Regards,
    Tobias
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/adding-table-to-a-container/#post-7151460)
 * Hi,
 * thanks for the link! I can confirm that the horizontal scrolling is not working
   when the vertical scrolling is enabled. Unfortunately, I’m not aware of another
   solution to this, as long as the vertical scrolling is also enabled 🙁
    We might
   simply have to wait for the Horizontal Scrolling of DataTables to get fixed. (
   Now after writing this, I’m not sure if we actually already tried that in conjunction
   with the vertical scrolling… Can you try again after turning off the Responsive
   Tables Extension and then turning “Horizontal Scrolling” back on?)
 * Regards,
    Tobias
 *  Thread Starter [lamccray](https://wordpress.org/support/users/lamccray/)
 * (@lamccray)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/adding-table-to-a-container/#post-7151463)
 * Looks like that did the trick. Thanks!
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/adding-table-to-a-container/#post-7151464)
 * 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](https://wordpress.org/support/view/plugin-reviews/tablepress)
   here in the plugin directory. Thanks!
 *  Thread Starter [lamccray](https://wordpress.org/support/users/lamccray/)
 * (@lamccray)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/adding-table-to-a-container/#post-7151468)
 * Hi Tobias-
 * I spoke too soon! The issue occurring again. Can you please refer to the page
   I provided earlier?
 *  Thread Starter [lamccray](https://wordpress.org/support/users/lamccray/)
 * (@lamccray)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/adding-table-to-a-container/#post-7151469)
 * The only thing I did differently was change the container type.
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/adding-table-to-a-container/#post-7151472)
 * Hi,
 * ah, bummer. From what I can see, that’s now caused by the table being part of
   a collapsable accordion. This means that the table is not visible initially, 
   meaning that it technically does not have a width. That is however required for
   the JS script to calculate the column widths.
 * I’m afraid that I’m out of ideas here :-/ Sorry.
 * Regards,
    Tobias
 *  Thread Starter [lamccray](https://wordpress.org/support/users/lamccray/)
 * (@lamccray)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/adding-table-to-a-container/#post-7151496)
 * Thanks for your help!
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/adding-table-to-a-container/#post-7151527)
 * Hi,
 * sure, you are very welcome! Sorry that I couldn’t offer a solution here.
 * Regards,
    Tobias

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

The topic ‘Adding table to a container’ 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/)

 * 13 replies
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [10 years, 3 months ago](https://wordpress.org/support/topic/adding-table-to-a-container/#post-7151527)
 * Status: resolved