Results 1 to 5 of 5

Thread: Background image in a select box?

  1. #1
    Join Date
    Sep 2004
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Background image in a select box?

    Hello everybody,

    Is it possible to insert a background image in a select box form?

    Thanks in advance,
    Pol

  2. #2
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Pol NRG
    Is it possible to insert a background image in a select box form?
    Please be more careful with how you phrase a question. To me "select box form" would mean the form that contained a select box, which is probably not what you meant.

    The answer - in any case - is yes, however whether it works in a particular user agent is a different proposition altogether. With IE, it will not. There is no workaround.

    Add the background as you would to any other element using the background CSS property.

    Mike

  3. #3
    Join Date
    Sep 2004
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi Mike,

    Thanks for your answer and excuse me for my english

    All the best!
    Pol

  4. #4
    Join Date
    Mar 2005
    Location
    England
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    There is a way if you want to get into javascript, I wrote myself a custom javascript selectbox using floating divs which updated the value of a hidden input field. I rewrote most of the basic form elements this way so I could use custom images for them.

  5. #5
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Bytrix
    There is a way if you want to get into javascript, I wrote myself a custom javascript selectbox using floating divs which updated the value of a hidden input field. I rewrote most of the basic form elements this way so I could use custom images for them.
    However, your users could be rather screwed if they don't have scripting enabled (or the necessary scripting support) and you didn't include a decent fallback.

    I really don't think going to such lengths is worth the effort at all. It's a form control, for goodness sake.

    Mike

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •