/    Sign up×
Community /Pin to ProfileBookmark

Styling Select Boxes

IE 6 is more flexible than ever for styling screen elements – and Ive noted that changing the scroll bar also changes it for text areas, but I still haven’t worked out if it’s possible for select boxes.

I’ve got a great-looking flat site, but there’s those glaring combos with their clumsy 3D arrow buttons… Any ideas?

to post a comment
CSS

3 Comments(s)

Copy linkTweet thisAlerts:
@JonaJun 17.2003 — [font=arial][color=maroon]IE allows options in a select box to be styled via CSS, but this does not work in any other browsers:[/color][/font]

[font=courier new]

<select name="sel1" size="1">

<option value="-1" selected>Choose one:</option>

<option value="1" style="backround-color:blue;color:white;">One</option>

<option value="2" style="background-color:white;color:blue;">Two</option>

</select>

[/font]

[b]Jona[/b]
Copy linkTweet thisAlerts:
@khakiJun 17.2003 — hi Geat...

(it's seems like a while since we shared a thread, huh? ? )

anyway...

you can get x-browser style by applying the style directly to the <select> tag itself.

<select multiple size=5 name="sel"

style="

background-color:#006699;

color: #fff;

font-family: verdana;

font-size: 13px;

text-align: center;

font-weight: bold;">

etc (probably more, i'm sure)

and then you can over-ride font color for specific <option> selections if you want to (although there is not much available for x-browser).

[SIZE=4]$[/SIZE]Opera is a little limited though.... but Netscape and Moz take well to it (pretty much).

I can't help you with scrollbars (i don't know... nor do I ever care to alter them myself).

just so ya know ? ...

? k
Copy linkTweet thisAlerts:
@GeatauthorJun 18.2003 — That's it Dave (thanks though Khaki).

It seems like that's the last thing IE needs to address - maybe in the next version...?
×

Success!

Help @Geat spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...