SitePoint Sponsor

User Tag List

Results 1 to 9 of 9

Hybrid View

  1. #1
    SitePoint Member derek's Avatar
    Join Date
    Aug 2001
    Location
    bc, canada
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    BG Image in DropDown Menu

    Is there a way to put a background image in a drop down menu thru CSS?

  2. #2
    SitePoint Guru
    Join Date
    Sep 1999
    Location
    Singapore
    Posts
    854
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    We'll have to take a look at the script.

  3. #3
    Former Staff Member silver trophy Adam P.'s Avatar
    Join Date
    Apr 2001
    Location
    San Francisco
    Posts
    3,288
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by duckie
    We'll have to take a look at the script.
    If it's a drop-down menu, it shouldn't be a script duckie. I think that derek means the <form> type drop-down menu. If that's what you mean derek, here's how:

    Code:
    select { background-image: url(the local extension goes in here); }
    An example of a local extension would be "images/plane.gif".

    Tell me if it works!
    SPF Mentor/Advisor 2001-2003
    SPF Designer of the Year 2002
    SPF Graphic Designer of the Year 2003
    AdamPolselli.com

  4. #4
    SitePoint Guru
    Join Date
    Sep 1999
    Location
    Singapore
    Posts
    854
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ahh, when I see "drop down menu" I keep thinking "DHTML menu", for some reason.

  5. #5
    SitePoint Wizard Aes's Avatar
    Join Date
    Jun 2001
    Location
    Oklahoma
    Posts
    3,392
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It will not work. You simply cannot do that with drop down menus or anything with the form tag ... yet.



    Although it is a good idea derek, Adam.
    Colin Anderson
    Ambition is a poor excuse for those without
    sense enough to be lazy.

  6. #6
    SitePoint Evangelist
    Join Date
    Jul 2001
    Location
    UK
    Posts
    407
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You could always settle for a background-color:colour, lol.

  7. #7
    SitePoint Guru
    Join Date
    Sep 1999
    Location
    Singapore
    Posts
    854
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well actually in Mozilla setting a background image works for <option>, but not <select>.

    The image will tile though, so the effect won't be really good, but yeah, just to inform you guys its possible.

  8. #8
    SitePoint Wizard Aes's Avatar
    Join Date
    Jun 2001
    Location
    Oklahoma
    Posts
    3,392
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's what I was referring to -- the <select></select>.

    I did not know, however, that it would work when defined in <option></option> in NS6.x/Mozilla. Very interesting.
    Colin Anderson
    Ambition is a poor excuse for those without
    sense enough to be lazy.

  9. #9
    Former Staff Member silver trophy Adam P.'s Avatar
    Join Date
    Apr 2001
    Location
    San Francisco
    Posts
    3,288
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's strange.....

    I got my answer from TopStyle Lite. I opened it, chose <select> as my selector, and when it gave me all of the attributes, background-image was one of them. Sorry about the misinformation
    SPF Mentor/Advisor 2001-2003
    SPF Designer of the Year 2002
    SPF Graphic Designer of the Year 2003
    AdamPolselli.com


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
  •