How to style select2?

13,120 views
Skip to first unread message

naresh.a...@gmail.com

unread,
May 21, 2013, 7:53:09 PM5/21/13
to sel...@googlegroups.com
What is the recommended approach for styling a select2 control? Say I want to increase the font size and color, also want to change the background color and the drop down icon. Attached is an example of what I am trying to do. Note that the background color of the window is the same as background color of the dropdown - in a way, making the drop-down's border disappear.

Thanks in advance for your help.

selectbox.png

Igor Vaynberg

unread,
May 21, 2013, 10:18:44 PM5/21/13
to sel...@googlegroups.com
use css. you can specify a custom css class using containerCssClass
and dropdownCssClass options.

-igor

On Tue, May 21, 2013 at 4:53 PM, <naresh.a...@gmail.com> wrote:
> What is the recommended approach for styling a select2 control? Say I want to increase the font size and color, also want to change the background color and the drop down icon. Attached is an example of what I am trying to do. Note that the background color of the window is the same as background color of the dropdown - in a way, making the drop-down's border disappear.
>
> Thanks in advance for your help.
>
> --
> You received this message because you are subscribed to the Google Groups "select2" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to select2+u...@googlegroups.com.
> To post to this group, send email to sel...@googlegroups.com.
> Visit this group at http://groups.google.com/group/select2?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

naresh.a...@gmail.com

unread,
Jun 11, 2013, 10:10:24 PM6/11/13
to sel...@googlegroups.com, naresh.a...@gmail.com
I tried adding a custom containerCssClass shown below, but can't figure out how to change the background color to grey. Any ideas how to do this:

.my-select2-container {
background-color: #666;
}

naresh.a...@gmail.com

unread,
Jun 11, 2013, 10:37:33 PM6/11/13
to sel...@googlegroups.com, naresh.a...@gmail.com
Never mind! I needed to set the background property, not just the background-color property.

.my-select2-container {
background: #666;
}

sheh

unread,
Aug 2, 2026, 1:06:01 AM (11 days ago) Aug 2
to select2
This discussion highlights how practical choices and thoughtful solutions can improve everyday experiences and make routines more comfortable.The same idea applies to footwear, where proper design and flexibility can support natural movement during daily activities.Resources like WHITIN Shoes Store connect naturally with this topic by offering minimalist footwear designed for comfort, flexibility, and everyday use.

Chrome Store

unread,
Aug 4, 2026, 9:49:43 AM (9 days ago) Aug 4
to select2
  Select2 is useful for building searchable and flexible selection fields, especially when a project has many options and needs a cleaner interface. In a media related project, users may also appreciate straightforward browsing features, and https://goojaraapk.app/ highlights tools such as search, genre and year filters, subtitles, watch history, and support for different viewing formats. Keeping these kinds of functions organized can make an interface easier to navigate without adding unnecessary complexity.  

Coils

unread,
Aug 10, 2026, 11:26:45 AM (3 days ago) Aug 10
to select2
  When discussing ways to make healthcare information easier to access, having a reliable option for blood testing can also be useful for people who need timely results. It may be worth considering visit here if you are looking for more information about available testing services. This fits well with the broader discussion around making health related processes more straightforward and accessible.  

Floras12

unread,
5:54 AM (6 hours ago) 5:54 AM
to select2

This is a useful point for anyone trying to keep things organized while working with Select2 and managing related resources. Having a straightforward way to find movie downloads can also make the process less frustrating when you need something specific.  click here   if you want to explore that option.
Reply all
Reply to author
Forward
0 new messages