The Lodge is members-only design/dev videos and Office Hours.

Next Office Hours Session: "Implementing an SVG Icon System" Nov 30 - 6:00 PM Eastern

How to apply background color to first item in a Select Box form? (No Javascript)

  • # February 14, 2013 at 12:26 am

    Here is an example code:

    I am trying to set the background-color of the form control selection box to be something other than white. Is it possible to do with CSS?

    # February 14, 2013 at 12:55 am


    # February 14, 2013 at 12:58 am

    omg. I feel like a newb now. How did I miss that??? I literally spent an hour trying to find css hacks and messing around with pseudo classes/elements trying to get the background to show up lol!


    # February 14, 2013 at 1:06 am

    @FatStraw You’re welcome. I think I got that code backwards so here is an update:

    # February 14, 2013 at 1:09 am

    I kept trying to make changes to the “selection option” part but never tried to do it with just “selection”. :(

    Thanks again for the help

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed