/    Sign up×
Community /Pin to ProfileBookmark

CSS and selection list object?

Hello,

Is it possible to put CSS into a select object?

I tried this but it doesn’t work…

<select size=”1″ class=fillin name=”pSector”>
<OPTION>A
<OPTION>B
<OPTION>C
</SELECT>

Thx a lot,

Luc Slenders.

to post a comment
CSS

3 Comments(s)

Copy linkTweet thisAlerts:
@gil_davisApr 03.2003 — Yes, styles on a SELECT work. If you would show what your style definition code is, perhaps someone can tell you what is wrong.

This works in IE 5.5:&lt;style type="text/css"&gt;
.f {background-color: #FFFFC0; color: green}
&lt;/style&gt;
&lt;form onsubmit="return false"&gt;
&lt;select class="f"&gt;
&lt;option&gt;A
&lt;option&gt;B
&lt;option&gt;C
&lt;/select&gt;
&lt;/form&gt;
Copy linkTweet thisAlerts:
@lucauthorApr 04.2003 — Sorry... this is the CSS I would like to do on the selection:

.fillin {border: 1px #003300 solid}
Copy linkTweet thisAlerts:
@gil_davisApr 04.2003 — According to http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/select.asp , IE does not support borders for a SELECT object. NS 6 supports it, but it does not exactly do what I would expect.

As a work-around, place the select inside of a span and apply the style to the span to get your border.
×

Success!

Help @luc 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 5.20,
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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

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

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...