dcsimg
www.webdeveloper.com
Results 1 to 7 of 7

Thread: CSS & Option Select Box

  1. #1
    Join Date
    Apr 2007
    Location
    Toronto
    Posts
    33

    CSS & Option Select Box

    Is there any way to style / modify a standard option select box so that it opens in its drop-down state instead of having to having to click the drop-down arrow first?

  2. #2
    Join Date
    Nov 2003
    Location
    Jerryville, Tejas
    Posts
    11,715
    Clicking anywhere on it should drop it down shouldn't it? At any rate CSS won't help.

  3. #3
    Join Date
    Apr 2007
    Location
    Toronto
    Posts
    33
    Yes, clicking anywhere does drop down the select box, however, I would like the option to have the select box open in the drop-down state without having to click anything.

    I did do some checking, and I couldn't find anything either that would allow me to do what I want using a standard option select box, so I posted here.

    Are Mozilla objects, like option select boxes, open source, and if they are, where is the source? How / can the properties of Mozilla objects be modified?

    Does anyone know of a solution or know of an open source option select box that will do what I want?

  4. #4
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    Either set the size attribute in the html or with JavaScript.

  5. #5
    Join Date
    Apr 2007
    Location
    Toronto
    Posts
    33
    Thanks for your reply Fang, but I don't quite get the effect I'm looking for with the size set to more than 1.

    With the size set to more than 1, I don't get the same onmouseover effect with the select options as I do with the size set to 1.

    I know I'm being picky!

  6. #6
    Join Date
    Nov 2003
    Location
    Jerryville, Tejas
    Posts
    11,715
    I guess you might try using the DOM and an onload handler to send a click event to the select.

  7. #7
    Join Date
    Apr 2007
    Location
    Toronto
    Posts
    33
    Thanks for the suggestion, ray326, I'll look into that!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles