We have updated Flexmonster Software License Agreement, effective as of September 30, 2024. Learn more about what’s changed.

Change min-width of the columns to be less than 100px

Resolved
Ragil Irawan asked on February 4, 2021

Hello team,

Is it possible to make the min-width of the columns to be less than 100px? I have some columns that only contain a short string/number so I want to make the column width fits the content.
I've tried using this in css

#fm-pivot-view .fm-grid-column {
min-width: 50px;
}

and it didn't work. It only works when I tried to increase the min-width (over 100px).
Any help/suggestion will be much appreciated. Thank you!

Best regards,
Ragil

2 answers

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster February 4, 2021

Hello, Ragil,

Thank you for reaching out to us.
 
We would like to confirm that you use the right CSS selector. However, the minimum width of the column is close to 50px by default. This is why the change is not noticeable after applying the mentioned rule.
 
We suggest decreasing the value to see the difference. Please see the JSFiddle we have prepared for the demonstration: https://jsfiddle.net/flexmonster/1w9pLs3o/. It shows the way to make columns resizable up to 20px.
 
Please let us know if it helps.
We are looking forward to hearing from you.
 
Kind regards,
Illia

Public
Ragil Irawan February 5, 2021

Hello Illia,
 
Thank you for the explanation and the example, it solved my problem!
 
Best regards,
Ragil

Please login or Register to Submit Answer