Created
November 5, 2013 10:02
-
-
Save ps-team/7316622 to your computer and use it in GitHub Desktop.
Style select menus and make them look 'awesome' using only css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add -webkit-appearance: none; to enable height values in Chrome and Firefox | |
for Opera you will need .styled-select select {background-color: rgba(0,0,0,0);…} | |
Should work in proper browsers and IE8 + | |
You'll probably need razor to use his in the majority of the Contensis modules. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Untitled Document</title> | |
<style> | |
.styled-select select { | |
background: transparent; | |
width: 268px; | |
padding: 5px; | |
font-size: 16px; | |
line-height: 1; | |
border: 0; | |
border-radius: 0; | |
height: 34px; | |
-webkit-appearance: none; | |
} | |
.styled-select { | |
width: 240px; | |
height: 34px; | |
overflow: hidden; | |
background: url(down_arrow_select.jpg) no-repeat right #ddd; | |
border: 1px solid #ccc; | |
border-radius: 6px; | |
} | |
</style> | |
</head> | |
<body> | |
<div class="styled-select"> | |
<select> | |
<option>Here is the first option</option> | |
<option>The second option</option> | |
<option>Guess what, a third option</option> | |
</select> | |
</div></body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment