Column width fixed too long using column filter extension
-
Hi Tobias – loving your plgin and extensions!
I have a very wide table – 15 columns – and I am using the Responsive and Columns Filter extensions.
The column widths seem to be fixed to all the SAME length (150px) instead of fitting the data. This is particularly evident on my production site where I use the Extranews theme – see link above. This site will be replaced shortly but I can’t show you my test site as it’s currently only on XAMPP.The problem is not so bad in my test site which uses the Radiate theme. With this theme, the issue only occurs when I set datatables_columnfilter to true.
My shortcode is[table id=16 responsive="scroll" datatables_columnfilter=true]
I was able to get around the issue as follows:
1. Add extra css class ‘wide-table’ to the table.
2. In plugin options add.wide-table input { width: 50px; }
The result is that each column is set to optimum width based on content, but the input box in the foot of each column is only 50px. It doesn’t look very pretty if the column is much wider than that, but it is far better than all columns being far wider than they need to be.
Alternatively, I could make custom css for each column but I also noted that this only worked if I added the input tag to the css as follows:.tablepress-id-12 .column-2 input { width: 50px; }
I am using WP version 5.6 (on my test site) and tested on Chrome, Edge and Firefox. Any suggestions to improve upon this workaround?
Thanks, CatherineThe page I need help with: [log in to see the link]
- The topic ‘Column width fixed too long using column filter extension’ is closed to new replies.