/    Sign up×
Community /Pin to ProfileBookmark

style.overflowX doesn’t work on <select>?

I use the style.overflowX property on <select> as following,
<select style=”width:30;overflowX=scroll”>
<option>abcde</option>
<option>abcdefghi12345</option>
</select>
The scroll bar doesn’t appear as I expected.

Also, the style’s cursor property doesn’t work on <select>.

Any friend can solve these problems?

Thank you!

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@FangMay 31.2004 — style="width:30;overflowX=scroll"

should be:

style="width:30px;overflowX:scroll"

This form element has limited style properties. Any that do work are usually applied to [I]option[/I] ([i]width[/i] being the exception).

overflowX is IE propriety.
Copy linkTweet thisAlerts:
@sharporauthorJun 01.2004 — Thank you.

But the scroll still can not appear even when I apply the property to the option as your advice.

<select size=6 style="width:30px">

<option style="overflow-x:scroll">123456</option>

<option style="overflow-x:scroll">1234567890</option>

</select>

And my browser is IE 6.0.
Copy linkTweet thisAlerts:
@Paul_JrJun 01.2004 — The number of ways you can style a select box is very limited, and I don't beleive what you are trying to do is possible. I believe something like that is up to the browser.
Copy linkTweet thisAlerts:
@FangJun 01.2004 — In [I]option[/I] the only style you can change are [I]font[/I] and [I]background-color[/I]. A few others are possible depending on the browser.

As for the overflow-x | overflowX, I only corrected it's syntax, it can not be applied to [I]option[/I].
×

Success!

Help @sharpor 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.1,
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: @meenaratha,
tipped: article
amount: 1000 SATS,

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

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