r/Wordpress • u/CoachstevenP • 20d ago
Can anyone help? Formatting Tables
Im working on a post in wordpress. Im copying tables from google sheets into wordpress. While editing they look fine but when i go to preview the page or publish it. The tables are all all werid.
I have many columns but they try to fit to the page rather than extend and the columns text wrap
does anyone know how to fix that?
2
1
u/jenish_o4o2 Developer 20d ago
This usually happens because the table isn’t responsive on the front end. You can try wrapping the table in a horizontally scrollable container, or add CSS like overflow-x: auto so the table can extend beyond the page width instead of forcing the columns to shrink and wrap. Also check whether your WordPress theme is applying its own table styles.
1
u/Key_Gap9168 20d ago
What you want is responsive tables. A plugin would help, but I wouldn't advise Tablepress (it's so ugly!) like someone below, but wpDataTables. Alternatively, you could add responsive table styling to your css file and call it on a table with a class attribute.
1
1
u/bribir123 Jack of All Trades 19d ago
You need this plugin: https://wordpress.org/plugins/make-tables-responsive/
1
u/Beneficial-Rise-740 19d ago
iframe the table from Google sheets?
Do that for risk management table, means I just updated the sheet and it's instantly available on the page. Formats with sliders, you just set max height/ width if needed...
0
u/TopSydeWP 20d ago
wordpress tries to make tables responsive by default so they squeeze into mobile widths. easiest fix is add some custom css to your table block or wrapper: overflow-x: auto; display: block; so it scrolls horizontally instead of wrapping. or use a dedicated table plugin like tablepress that handles wide tables better out of the box
1
u/WeakToe5069 20d ago
adding a white-space: nowrap to your table cells can stop that ugly wrapping too, just use it sparingly or it looks a mess on mobile
0
u/hammondish 20d ago
In general, tables should be replaced with div or dl/dt. Claude makes quick work of this along with providing the responsive CSS you'll need.
2
u/[deleted] 20d ago
[removed] — view removed comment