Search box 2
HTML
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/3.1.0/css/font-awesome.min.css">
<div id="search" class="alt">
<form action="javascript:alert('Inner Function performed!');">
<input type="text" name="search_query" value="defaultValue" />
<button type="submit">Search</button>
</form>
</div>
CSS
#search form {
text-decoration: none;
position: relative;
}
#search form button {
font-size: 0;
position: absolute;
right: 0;
top: 8px;
background-color: transparent;
border: 0;
appearance: none;
}
#search form button:before {
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
font-family: FontAwesome;
font-style: normal;
font-weight: normal;
text-transform: none !important;
-moz-transform: scaleX(-1);
-webkit-transform: scaleX(-1);
-ms-transform: scaleX(-1);
transform: scaleX(-1);
color: #7f888f;
content: '\f002';
cursor: default;
display: block;
font-size: 1.5rem;
height: 2rem;
line-height: 2rem;
opacity: 0.325;
text-align: center;
width: 2rem;
}
input[type="text"] {
height: 2.75em;
}
input[type="text"] {
-moz-appearance: none;
-webkit-appearance: none;
-ms-appearance: none;
appearance: none;
background: #ffffff;
border-radius: 0.375em;
border: none;
border: solid 1px rgba(210, 215, 217, 0.75);
color: inherit;
display: block;
outline: 0;
padding: 0 1em;
text-decoration: none;
width: 100%;
}
body,
input,
select,
textarea {
color: #7f888f;
font-family: "Open Sans", sans-serif;
font-size: 13pt;
font-weight: 400;
line-height: 1.65;
}