How do I make an existing html table responsive?
I have an existing Dreamweaver-built site that I am making responsive. It has about 3000 tables in it (data management, not layout), so I really want to find a global solution to making them responsive, I don't want to change the code in each one individually. At this point I have converted it to a bootstrap site, and everything but the tables seems to mostly work.
Now, on narrowing the screen, the tables go to a single column; each row's data is still there, but they are stacked. The first table below (what I'm starting with) becomes the second, which is clearly unacceptable:
| Header 1 | Header 2 | Header 3 |
|---|---|---|
| 1a | 1b | 1c |
| 2a | 2b | 2c |
| 3a | 3b | 3c |
Header 1 |
Header 2 |
|---|
| Header 3 |
| 1a |
| 1b |
| 1c |
| 2a |
2b etc. |
Most of my tables currently have a class applied to them, so that may offer a global solution, if there might be characteristics that could be added to the existing class.
Possible problem areas: most of the tables have column widths, etc., applied to them, as we were trying to make them most attractive for the desktop (who knew we would need to do something entirely different later?), and those are not even close to all being the same, so "find and replace" won't helpful there. There are also varying numbers of rows and columns across the site.
My current iteration is on line (bricarol.xyz). If you click on "racing results and archives" then "tour de france", there's a big table there, and all my code.
Hoping someone has some magic!
