/    Sign up×
Community /Pin to ProfileBookmark

<select> tag as a wheel spinner

Hi,
I’m writing an html to be used inside a 90px height iframe.
I have a selection box with 95 options, and i wish to make it like a wheel spinner so it fits the 90px height without a dropdown menu.
Can anyone tell me if this is possible, and if so, how?
Thanks in advance

to post a comment
HTML

2 Comments(s)

Copy linkTweet thisAlerts:
@Kevin2Jul 10.2016 — As you have probably already found out, <select> and its <option> children accept very little styling. Therefore it's probably not going to be your best choice of inputs. Something I'm confused about is your choice of an iframe for display. Anyway, see if the following is anywhere close to what you want:

[code=html]<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>spin box</title>
<style>
ul {
list-style-type: none;
width: 110px;
height: 90px;
overflow-y: auto;
overflow-x: hidden;
}
li {
border: 1px solid #000;
margin-top: -1px;
}
li:first-of-type {
margin-top: 0;
}
li label {
display: block;
cursor: pointer;
line-height: 1.5em;
padding-left: 3px;
background-color: #c0c0c0;
}
input[name=spinner] {
display: none;
}
input[name=spinner]:checked ~ label {
background-color: #fff;
}
</style>
</head>
<body>
<form action="#">
Choose your favorite color:
<ul>
<li><input type="radio" name="spinner" id="green" value="green"><label for="green">Green</label></li>
<li><input type="radio" name="spinner" id="blue" value="blue"><label for="blue">Blue</label></li>
<li><input type="radio" name="spinner" id="yellow" value="yellow"><label for="yellow">Yellow</label></li>
<li><input type="radio" name="spinner" id="red" value="red"><label for="red">Red</label></li>
<li><input type="radio" name="spinner" id="purple" value="purple"><label for="purple">Purple</label></li>
<li><input type="radio" name="spinner" id="silver" value="silver"><label for="silver">Silver</label></li>
<li><input type="radio" name="spinner" id="black" value="black"><label for="black">Black</label></li>
<li><input type="radio" name="spinner" id="gray" value="gray"><label for="gray">Gray</label></li>
</ul>

<input type="submit" value="Submit">
</form>
</body>
</html>[/code]
Copy linkTweet thisAlerts:
@designing_webJul 12.2016 — I'm trying with ionicscroll, to magnetize items, I need to get more events from scroll directive/service. I only have on-scroll. It would be great if we can have on-start-scrolling /on-scrollng/ on-end-scrolling.

What do you think ?
×

Success!

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

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

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