Forum Moderators: not2easy

Message Too Old, No Replies

select box stylesheet

can this be done?

         

newnewbie1

1:39 pm on May 21, 2003 (gmt 0)

10+ Year Member



Hi!

I'd like to "colorize" the little arrow boxes in a select box? Can that be done with css?

Here's the stylesheet I'm using:

SELECT.selectbox
{

font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
color : #000000;
font-weight: normal;
background: #FFFFFF;
scrollbar-base-color:White;
scrollbar-face-color:577C9E;
scrollbar-shadow-color:#E5DFBF;
scrollbar-highlight-color:#E5DFBF;
scrollbar-3dlight-color:#336699;
scrollbar-darkshadow-color:DarkBlue;
scrollbar-track-color:#E5DFBF;
scrollbar-arrow-color:#E5DFBF;
}

And here's my HTML:

<select name="marketinginfo" class="selectbox" id="marketinginfo" size="1">
<option value="0" default>How did you hear about us?</option>
<option value="phone book">phone book</option>
<option value="internet">Internet</option>
<option value="other">other</option>
</select>

And my little arrow box is still the same default grey.

Can you change the color of the arrow box in a select box with css?

Thx!

Alternative Future

1:52 pm on May 21, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



No as far as i know it cannot be done!

[edit]I think there is a work around that you can do to replicate the select box with a colored arrow though - perhaps someone else might have better knowledge on this :)[/edit]

-gs

BlobFisk

2:58 pm on May 21, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Alternative Future is right to an extent. The drop-down nature of select lists is inherited from the OS, and therefore is somewhat immune to the effects of CSS.

However, with some ActiveX controlling, I believe that you can achieve the effect you are looking for. But, to all intents and purposes what Alternative Future has said is correct. Why? Because I feel that the overhead involved in changing the colour is not worth it. There is also a usability consideration, people expect to see a standard format to these type of form elements, so reinventing that particular wheel could have quite a few knock on effects.

drbrain

4:48 pm on May 21, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



[edit]Oh darn, that doesn't do what you want, nothing to see here, move along[/edit]

[edited by: drbrain at 5:04 pm (utc) on May 21, 2003]

BlobFisk

4:57 pm on May 21, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



drbrain, that requires a plugin to be installed/enabled, doesn't it? Most users won't have that.

drbrain

5:09 pm on May 21, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It'll style regular buttons, but not the select dropdown button, nor scrollbars or their buttons (at least on win32, I'm not sure about unix, since it (typically) uses gtk to render its widgets).

That particular URL doesn't work because the .css files aren't .css files, they're HTML. Gfx rendering is on by default in mozilla.

BlobFisk

5:14 pm on May 21, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member




Gfx rendering is on by default in mozilla

Didn't seem to be in (Mozilla) Firebird though! ;)