Forum Moderators: not2easy
Pick your favourite browser:
[ Firefox ][v]
Pick your favourite browser:
( IE | Firefox | Chrome | Safari | Opera )
... other inputs, perhaps ...
( Vote! )
<p>Pick your favourite browser:</p>
<form action="vote.php" method="get">
<select name="fav_browser">
<option value="ie">IE</option>
<option value="ff">Firefox</option>
<option value="ch">Chrome</option>
<option value="sf">Safari</option>
<option value="op">Opera</option>
</select>
... other inputs, perhaps ...
<input type="submit" value="Vote!" />
</form>
select {<disclaimer>Some of these CSS features are not safe for older browsers - I know! I will add in gradient images and browser-specific rounding once we have things how they need to be.</disclaimer>
? ? ?
}
option {
background: linear-gradient(top, #f2f5f6 0%,#e3eaed 37%,#c8d7dc 100%);
padding: 5px;
border-left: 1px solid #999999;
color: black;
text-align: center;
}
// Round the corners on the first and last options in the set
option:first-child {
border-top-left-radius: 4px;
border-bottom-left-radius: 4px;
}
option:last-child {
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
}
// When the users hovers over an option, change the background color slightly
option:hover {
background: linear-gradient(top, #f7fbfc 0%,#d9edf2 40%,#add9e4 100%);
color: white;
}
// When the user has selected an option, make it dark blue
option:active {
background-color: #2c539e;
color: white;
}