Hi Michael
Thanks for looking at this again.
It seems from your answers on this thread that I might not have made it clear that it is the horizontal (i.e. “x”) scrollbar that I have had an issue with, not the vertical (i.e. “y”) scrollbar.
My issue wasn’t that I want to have the height of the table automatically adjusted. My problem has always been that I could not scroll to the right to see all the columns (“x” scrollbar), nor scroll back to the left, unless I first scrolled right to the bottom of the table where the “x” scrollbar sits. I actually wanted the “x” scrollbar to detach itself from the table and instead attach itself to the browser window.
I spent some time researching this myself on the weekend and I found a temporary fix using Firebug in Firefox (I changed 2 scroll classes to overflow:visible). Of course, this only worked until I refreshed the page!
Looking again at the “jquery.dataTables.js” file after I saw your latest reply, I found a section I’d missed before, referring to the horizontal scrollbar:
Enable horizontal scrolling. When a table is too wide to fit into a certain layout, or you have a large number of columns in the table, you can enable x-scrolling to show the table in a viewport, which can be scrolled.
The example given in the file to implement a viewport horizontal scrollbar is
"sScrollX": "100%",
The default value, however, is a null string – meaning this option is disabled.
"sScrollX": "",
I saw that in your code above you used the “100%” value, and I remembered seeing that in the “CFDBViewWhatsInDB.php” file on the weekend but wasn’t aware of its significance at the time.
I have now edited the “CFDBViewWhatsInDB.php” file to replace the 100% value with a null, and my problem is solved!
Now being aware of the correct terminology, I can succinctly say that I had a horizontal toolbar on the viewport rather than on the browser, so sorry if I confused you before by not using the term “viewport” in my original question.
I would love you to add an option to your plugin, so I don’t have to repeat my edit on each plugin update, and so people could choose where they want the horizontal scrollbar to appear if they have a large number of columns. Alternatively, I suggest you revert to the default (disabled) setting which has better utility.
Whatever you decide to do, thanks for pointing me in the right direction to fix the issue ??