I'm using Advanced Column Filters shown in a form above the table. I would like to customize the size of the filter fields, they are way too big for a mobile device and I would like their overall size to be smaller. Can you provide some example custom CSS code to change these field sizes?
1. For setting up separate styles/look that will apply only to mobile screens,
you can add a custom Media Query for a Responsive Design.
Here is an example, if we wish to reduce the width of the entire container that holds all the filters above the table to 50% width of the page, and to place them at the center horizontally.
/* Extra small devices (phones, 480px and down) */
@media only screen and (max-width: 480px) {
.wpdt-c .wpDataTablesFilter {
line-height: normal !important;
width: 50% !important;
margin: 0 auto !important;
}
}
You can try this CSS selector for manipulating the width of each filter's container :
Firstly, I would like to sincerely apologize for the delayed response as we have been experiencing an unusually high number of tickets. I am sorry that it has taken longer than usual to respond to your concern and your patience is highly appreciated.
-
I see what you mean. For example, on my tables as well, if I disable editing and Table Tools, it does leave some gap between the table and the fitlers above.
Here is a CSS you can use to reduce the bottom margin of the wpDataTables Wrapper, if you wish to try :
.wpDataTablesWrapper { margin-bottom: 0px; }
This default value is 20 pixels, I reduce it to zero there.
You can go in the minus values as well, up to -33px, this is how it looks on my end.
I'm using Advanced Column Filters shown in a form above the table. I would like to customize the size of the filter fields, they are way too big for a mobile device and I would like their overall size to be smaller. Can you provide some example custom CSS code to change these field sizes?
Hi, TonyF.
1. For setting up separate styles/look that will apply only to mobile screens,
you can add a custom Media Query for a Responsive Design.
Here is an example, if we wish to reduce the width of the entire container that holds all the filters above the table to 50% width of the page, and to place them at the center horizontally.
You can try this CSS selector for manipulating the width of each filter's container :
As above, if you need this only for mobile screens, add this style wrapped inside the media query, like :
@media only screen and (max-width: 480px) { ... all your CSS for mobiles here ... }
-
To add this, if you need the same for all tables, add it to main plugin settings/Custom JS and CSS/Custom CSS,
or for just one table, add it to the table's Customize/Custom CSS.
Let me know if that helps.
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
The setting for the width of each individual filter container is just what I was looking for, thanks.
The filters container position is far above the table. Can the space between be adjusted?
Hi, TonyF.
Firstly, I would like to sincerely apologize for the delayed response as we have been experiencing an unusually high number of tickets. I am sorry that it has taken longer than usual to respond to your concern and your patience is highly appreciated.
-
I see what you mean. For example, on my tables as well, if I disable editing and Table Tools, it does leave some gap between the table and the fitlers above.
Here is a CSS you can use to reduce the bottom margin of the wpDataTables Wrapper, if you wish to try :
This default value is 20 pixels, I reduce it to zero there.
You can go in the minus values as well, up to -33px, this is how it looks on my end.
I hope that helps.
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Thank you Milos, this does help. That answers all my questions, you can close this ticket.