I have applied the following in HTML->Styles->User :
.select2-container--bootstrap5 .select2-selection--single {
min-width: 285px;
}
But now i want to force min-width on a specified column in HTML->Styles->User like:
#id [data-field=x_country_codeid] {
width: 10px;
}
but that is not working. Kindly advise
mobhar
2
Try:
#id [data-field="x_country_codeid"] {
width: 10px !important;
}
For more info, please Google css data selector.
No effect.
please note that i am using this field in Custom Template->Add page
arbei
4
shahparzsoft wrote:
#id [data-field=x_country_codeid] {
What is “#id”? Did you mean “x_country_codeid” is a Select2 field? You better post your actual code for discussion.
I put that code in HTML->Styles->User:
but not working.
#id [data-field=“x_country_codeid”] {
width: 10px !important;
}
Its Select2 field.
arbei
6
arbei wrote:
What is “#id”?
You better right click the element in Chrome and select Inspect to check the actual CSS selector, see Open the Elements panel to inspect the DOM or CSS.
ID of the field is : x_country_codeidwhat should i use at the place of #id
arbei
8
You may learn CSS and read ID selectors.