Hi,
thanks for your post, and sorry for the trouble.
This code is not working because there’s a . missing before the column-1. However, even then, you will not see a change. The reason for that is that you can never change the width of the table to something below of what the content in the cells requires. There’s simply too much content in your table.
One idea to work around this is to make the table scrollable horizontally, for example by adding this to the “Custom CSS”:
#tablepress-1_wrapper {
overflow-x: scroll;
overflow-y: hidden;
}
Regards,
Tobias
I thank you for your answer. I set “.” before the column-1 and removed two columns, table width was less, but the column width anyway not regulated.
Hi,
yes, that’s expected, as I tried to describe. You still have a lot of data in your table, so that the available space (given to the table by the theme) is not enough for the entire table.
What exactly are you trying to do here, i.e. what look do you want to achieve?
Regards,
Tobias
I’m trying to understand why not all work the settings SSC. I have already removed the extra columns, but I can not change the width of one column and set the table in the center. Example, I want to make the first column with less 107px to 50px. And how you can change the font of the title? Thanks.
Hi, sorry to borrow your thread, idolzest, but I wish to get some clarification on this matter.
So Tobias, what you’re saying is, even if we set the width to 10 for example, the actual width of the column will not shrink below the minimum width of the content? So if I set it as 10, and I have a word 15pixels long, the width will be set at 15, correct?
Thanks for your help. Try to explain more: I would like to get a table of 14 columns with sorting fields as here http://guitar-divan.ru/guitar-gear/malenkie-giganty-bolshogo-zvuka-2.html. But I can not figure out how to reduce the font and column width for my size. Is it possible to realize my problem with your plugin?
@azarimy: It is considered impolite to interrupt another poster’s ongoing thread unless you are posting a solution or suggestion. As per the Forum Welcome, please post your own topic.
I am sorry, but everything remains in the subject change column/table width…
Hi,
@azarimy: Yes, that is correct. The table content dictates the minimal sizes for the columns (the text has to go somewhere after all). (Now, there is a way to change that behavior with CSS, using the table-layout CSS property, but I don’t recommend that.)
@idolzest: You are on the right track already. Instead of trying to mess with column widths (which will not help here), you can reduce the font size and padding in the cells, e.g. with this:
.tablepress-id-1 thead th,
.tablepress-id-1 tbody td {
font-family: Tahoma;
font-size: 10px;
padding: 4px;
}
After that, there should be more room for more data.
Regards,
Tobias
Thank you very much for your help!
Everything turned out the way I wanted.
Regards,
Dmitriy.
Hi,
no problem, you are very welcome! 🙂 Good to hear that this helped!
Best wishes,
Tobias
P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!