Thanks Andrewds1021. I summarized all I have learned. I think the solution is only going to come from Fandom/Wikia incorporating some of English Wikipedia's site-specific and browser-specific CSS and JS. See:
https://cannabis.wikia.org/wiki/User:Timeshifter/Sandbox31
Table header cells need borders between them. The problem only seems to be occurring with the Firefox browser. Other people using the Firefox browser see the same problem with the tables in sandbox 31.
I temporarily disabled all my Firefox addons. That did not help. I blanked my user CSS and JS pages. That did not help. I also temporarily blanked the MediaWiki:Wikia.css page for 45 minutes.
*https://cannabis.wikia.org/wiki/MediaWiki:Wikia.css
The other site JS and CSS pages were already empty. I did ctrl-F5 every 5 minutes for 45 minutes. I could see the blanking cause changes on the home page. But it did not solve the table problem in sandbox 31.
*https://cannabis.wikia.org/wiki/User:Timeshifter/JS_and_CSS_customization
The problem does not show up when the table is posted on my user page on Community Central. But one thing is different. The sorting icons do not drop down to the second header row as they do in sandbox 31 .
*https://community.fandom.com/wiki/User:Timeshifter
There are no table problem on this Wikipedia sandbox page linked below. The header cells on both rows have borders. The sorting icons show up in the second row as they should.
*https://en.wikipedia.org/wiki/User:Timeshifter/Sandbox133
English Wikipedia has site-specific CSS and JS pages. And some of it is specific to particular browsers. Fandom/Wikia may not have the same CSS and JS. See:
*https://en.wikipedia.org/wiki/Wikipedia:Common.js_and_common.css