What is the best method to handle CSS stylesheets for printing tables outputted by wp-table-reloaded? Thanks.
thanks for your post.
What exactly do you mean here?
Do you already have such a stylesheet and just want to know how to include it? Or do you want to create such a stylesheet?
I have a player roster table in one template and a game schedule table in another template, each of which is styled by its own secondary stylesheet. The roster template also has a print stylesheet so people can print the roster and take it to a game.
Going forward, I’d like to manage the roster and schedule through your plugin. Your interface would make the tables easier to maintain. Plus I would like to add past season team pages to the site with each team’s roster and schedule included, but styled differently than the current season.
Thanks for responding to my question. Great plugin.
thanks for the explanation.
Then all you probably will need to do is change a few CSS selectors in your stylesheets. Or you could add the existing selectors as an “Extra CSS class” to the table. That way, you can re-use your stylesheets.
Thanks Tobias. When a page/template containing a table is rendered, are the plugin CSS rules applied after the style.css and any secondary stylesheets? Seems like my printing CSS rules work best if added to the end of the plugin’s custom CSS area rather than in my print css stylesheet. Best….
that depends on your actual theme. Just take a look at the HTML source code (in your browser, click “View Source” or similar), where you can see the order in which the CSS files are loaded.
Yes, I see where the plugin CSS is added, but it seems to be added on all pages instead of just on pages that contain the tables. Any way to limit that….maybe like Justin Tadlock suggests here: http://justintadlock.com/archives/2009/08/06/how-to-disable-scripts-and-styles
yes, you are correct, the stylesheets for tables are added on all pages. The reason for that is, that the plugin does not yet know if there are tables on the page, when the CSS needs to be included in the head of the page. In other words, the plugin does not know in the head, if there are Shortcodes for tables or the template tags in the page. That’s why the CSS is included on all pages.
If you really need to change this (although, due to caching, this generally is not a problem), I suggest to take a look at the HiFi plugin (http://wordpress.org/extend/plugins/hifi/), which allows you to add code to the page head. That way, you could load the CSS manually, on all pages that contain a table.
Thanks Tobias. The tables are looking great. Thanks so much for this plugin.
(Any way to turn on the plugin’s css only on those pages in which a table is used….. in the same way that the Post/Page Tabs plugin can be turned on only on specific pages and posts?)
- The topic ‘[Plugin: WP-Table Reloaded] Styling for Table Printing’ is closed to new replies.