Forum Moderators: not2easy

Message Too Old, No Replies

Changing the appearance of drop down menus

         

buzzybee

6:52 am on Apr 19, 2003 (gmt 0)



Hi,

Forgive me if this question has been asked before, but the most recent I found was a couple of years and I am hoping that a solution has been found in the meantime.

I am wanting to change the appearance of a drop down menu box. I have changed the appearance of a normal text box, and it looks silly having the standard drop down box on the same page. I have done numerous searches in vain on the net, so was hoping someone may be able to help me.

Thanks in advance.

Jennifer

DrDoc

2:37 pm on Apr 19, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Well, Jennifer, first of all - Welcome [webmasterworld.com] to Webmaster World! :)

Like you said, this question has been asked before. At least you know that it was impossible to change the look of the select box a couple of years ago, and I'm afraid it is just as impossible today.

This has nothing to do with browser problems or that the solution doesn't exist... it's just a problem with interaction with the OS. Since all form elements are OS dependant, it differs from one OS to the other how much you're allowed to change, and to what extent.

As for now, the only things you can change in select boxes (using purely CSS) is the background color, text color, and font.

pageoneresults

5:49 pm on Apr 19, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



DrDoc, actually I believe you can style a portion of your select boxes. I've done it on one site and am planning on doing it with another. On one site I've used the optgroup tag along with some css to style the look of the select box.

From the W3C in regards to the optgroup...

17.6 The SELECT, OPTGROUP, and OPTION elements [w3.org]

Another topic where this was discussed...

CSS with Form [webmasterworld.com]

A few more examples from MAKO...

Styling of Forms [mako4css.com]

P.S. You can also style your <option> and <optgroup> tags for added affect.

DrDoc

4:01 am on Apr 20, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



you can style a portion of your select boxes

Yes, but it differs from browser to browser. And, you can't style select boxes as much as you can style all the other form elements.

Right now it's safer to stick to just the three I mentioned, since they work in all recent browsers.

pageoneresults

5:03 am on Apr 20, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I'll agree with you there.

There is a workaround for this. You can enclose the various elements in a div and then style that. You can achieve some rather interesting effects that are more cross browser friendly.