<h2>Search</h2>
<div class='search-box clearfix'>
<form action='/search' class='search-form clearfix' method='get'>
<p class='input-search-text'>
<input class='search-text' maxlength='255' name='q' onblur='if (this.value == '') this.value = this.defaultValue;' onfocus='if (this.value == this.defaultValue) this.value = '';' type='text' value='Search'/>
</p>
<p class='input-search-submit'>
<input class='search-submit' name='submit' type='submit' value='Search'/>
</p>
</form>
</div>
</div>
CSS
.search-box{margin-left:30px;}
.search-box .search-form {
position:relative;
width:278px;
height:48px;
}
.search-box .search-form .search-text {
border:1px solid #e8e8e8;
width:206px;
line-height:48px;
color:#aeaeae;
font-size:16px;
font-family: Arial, sans-serif;
height:48px;
margin:0;
padding-left:10px;
padding-right:60px;
position:relative;
z-index:0;
}
.search-box .search-form .search-submit {
width:54px;
height:50px;
background:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqd4VKzbgqZTncncIJB3ktd3oP0jeUv5BObM3Iu8uPhb3CtaTFeMezWUbVmXPRs2hFLECj77_jCbuhHyphxgqRIuQLGQMDvUALPDHBK3q65nBpE4iM5uwkGj7fxT_kqocRtxbpgog2cpPo/s1600/search-icon.png) no-repeat 0 0;
border:none;
padding:0;
margin:0;
cursor:pointer;
position:absolute;
top:-7px;
right:5px;
text-indent:-9999px;
line-height:0;
font-size:0;
}
.search-box .search-form .search-submit:hover{
opacity:0.8;
}
.search-box .search-form .search-text:focus {
box-shadow:0 0 5px #ddd;
-moz-box-shadow:0 0 5px #ddd;
-webkit-box-shadow:0 0 5px #ddd;
border:1px solid #cccccc;
}
<div class='search-box clearfix'>
<form action='/search' class='search-form clearfix' method='get'>
<p class='input-search-text'>
<input class='search-text' maxlength='255' name='q' onblur='if (this.value == '') this.value = this.defaultValue;' onfocus='if (this.value == this.defaultValue) this.value = '';' type='text' value='Search'/>
</p>
<p class='input-search-submit'>
<input class='search-submit' name='submit' type='submit' value='Search'/>
</p>
</form>
</div>
</div>
CSS
.search-box{margin-left:30px;}
.search-box .search-form {
position:relative;
width:278px;
height:48px;
}
.search-box .search-form .search-text {
border:1px solid #e8e8e8;
width:206px;
line-height:48px;
color:#aeaeae;
font-size:16px;
font-family: Arial, sans-serif;
height:48px;
margin:0;
padding-left:10px;
padding-right:60px;
position:relative;
z-index:0;
}
.search-box .search-form .search-submit {
width:54px;
height:50px;
background:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqd4VKzbgqZTncncIJB3ktd3oP0jeUv5BObM3Iu8uPhb3CtaTFeMezWUbVmXPRs2hFLECj77_jCbuhHyphxgqRIuQLGQMDvUALPDHBK3q65nBpE4iM5uwkGj7fxT_kqocRtxbpgog2cpPo/s1600/search-icon.png) no-repeat 0 0;
border:none;
padding:0;
margin:0;
cursor:pointer;
position:absolute;
top:-7px;
right:5px;
text-indent:-9999px;
line-height:0;
font-size:0;
}
.search-box .search-form .search-submit:hover{
opacity:0.8;
}
.search-box .search-form .search-text:focus {
box-shadow:0 0 5px #ddd;
-moz-box-shadow:0 0 5px #ddd;
-webkit-box-shadow:0 0 5px #ddd;
border:1px solid #cccccc;
}
0 nhận xét : Code tìm kiếm cho blogspot
Đăng nhận xét