Archived topic
Table customization
13 replies · Started by Eric on January 10, 2017
Hi Tom, all,
I would like to customized the table properties (margin, border line colors...).
GP doesn't include a way to do it? Is the "Add CSS" setting the only/straighter way to do that or have I missed something?
Also, I would like to change the space before/after my headings in the sidebar. How can I do that?
Thanks a lot
Eric
Hi Eric,
I would suggest using a plugin for creating tables. Here are a couple suggestions from Tom and another other user suggested:
https://en-ca.wordpress.org/plugins/magic-liquidizer-responsive-table/ (responsive)
https://wordpress.org/plugins/tablepress/
Thank you Leo. Your links may help me some day, but unless I have missed something they don't allow me to change the border colours and margins for example.
Does GP includes this somewhere in its configuration? (if not, I'll have to add the CSS properties by myself)
Thanks
Eric
Hi Eric,
Unfortunately GP does not currently support table customization.
I would still recommend using a plugin as it would be responsive (unless you want to write your own codes to make it responsive), and you should still be able to write CSS to modify the border margin etc for the plug in.
Hope this helps.
Yes it does.
Thanks a lot Leo.
Best,
Eric
Glad I can help!
Does GP still not submit table customization?
Hi there,
if you require Tables in your site you're better off using a plugin that provides responsive ands styling controls.
Just looking at tables on my site.
Am I right that GP sets a thin border on tables as default?
https://github.com/tomusborne/generatepress/blob/master/assets/css/main.css#L190
I think this means that the old-style table attributes don't work. So, for example, <table border="0"> has no effect as it is overriden and I get a thin light border showing.
Does this mean I have to use CSS? I am working on migrating a large site which has many different tables with many varied presentations set with old-style table attributes. Some have borders, some don't. They're proper tables showing tabulated data, so I don't want to revisit each one and apply inline CSS, and a global CSS rule to set border="0" will presumably also override the table setting.
Just wondering what the thinking is behind making tables have a border when the advice seems to be that GP doesn't do tables.
Any tips appreciated.
Hi there,
not sure if this will work but you can try overwriting the properties with initial
e.g
table,
th,
td {
border: initial;
}
GP + GPP is almost 7 years old now - some of the CSS for things such as tables were standard boiler plate CSS for themes back then, and for backwards compatibility it cannot be easily changed. To be honest i am not sure i have ever seen this come up before.
Thanks - super useful as I didn't know about the 'initial' setting.
The site I'm converting has been running for more than 20 years and has thousands of pages of hand-crafted HTML. It's quite a challenge to bring it all up-to-date!
Wow - i bet thats a fun job.
Let us know if that initial setting works - haven't tested ....
It is!
Yes, that initial setting seems to be doing a good job.
thanks!
Awesome ! Glad to hear that