All Posts by Email, Once a Week

Media Temple logo

CSS-Tricks is brought to you in part by Media Temple, the web hosting that we both use and recommend.

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