--- title: Appearance taxonomy: category: docs process: twig: true never_cache_twig: true --- The appearance of your Select2 controls can be customized via the standard HTML attributes for `` elements. You can also initialize Select2 with `disabled: true` to get the same effect.





## Labels

You can, and should, use a `
  

``` ``` ## Container width Select2 will try to match the width of the original element as closely as possible. Sometimes this isn't perfect, in which case you may manually set the `width` [configuration option](/configuration):
Value Description
"element" Uses the computed element width from any applicable CSS rules.
"style" Width is determined from the select element's style attribute. If no style attribute is found, null is returned as the width.
"resolve" Uses the style attribute value if available, falling back to the computed element width as necessary.
{width_value} Valid CSS values can be passed as a string (i.e. 80%).
### Example The two Select2 boxes below are styled to `50%` and `75%` width respectively to support responsive design:

``` ```




>>>> Select2 will do its best to resolve the percent width specified via a CSS class, but it is not always possible. The best way to ensure that Select2 is using a percent based width is to inline the `style` declaration into the tag.

## Themes

Select2 supports custom themes using the `theme` option so you can style Select2 to match the rest of your application.

These examples use the `classic` theme, which matches the old look of Select2.





Various display options of the Select2 component can be changed.  You can access the ``) and any attributes on those elements using `.element`.