Created
May 7, 2016 16:53
-
-
Save mikeoberdick/cddce1e1073e90c70e9ed3f6247669cd to your computer and use it in GitHub Desktop.
Expanding Search Form
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
.search-form { | |
position: absolute; | |
right: -50px; | |
top: 2px; | |
} | |
.search-form input[type="search"] { | |
background-color: transparent; | |
background-image: url(/wp-content/uploads/2016/03/search_icon.png); | |
background-position: 5px center; | |
background-repeat: no-repeat; | |
background-size: 24px 24px; | |
border: none; | |
cursor: pointer; | |
height: 40px; | |
position: relative; | |
-webkit-transition: width 400ms ease, background 400ms ease; | |
transition: width 400ms ease, background 400ms ease; | |
width: 0; | |
z-index: 100; | |
} | |
.search-form input[type="search"]:focus { | |
padding: 0 0 0 34px; | |
background-color: #fff; | |
border: 2px solid black; | |
cursor: text; | |
outline: 0; | |
/*width: 230px;*/ | |
width: 300px; | |
} | |
.search-form input[type="submit"] { | |
display: none; | |
} | |
input[type="search"] { | |
-webkit-appearance: textfield; | |
} | |
.search-form { | |
overflow: hidden; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment