Grow your CSS skills. Land your dream job.

using ::selection for an input field

  • # October 27, 2009 at 11:04 am

    i am trying to get the text boxes on a page to have a specific background color of the text inside them when selected. i know about the new css 3.0 ::selection method and therefore tried this code:

    input::selection
    {
    background: #404040;
    }

    however, it has no effect. i am running safari 4.0 and when you take the ‘input’ bit away it works fine on the body text but not in the text boxes.

    i begin to think it might not be doable but would love to know either way.

    cheers

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".