Everything seems fine, but in HTML5 mode, the search button may look longer than expected. I am using Chrome 56 on Windows 10.
I'm having trouble figuring out why this is happening.
Original code:
body {
font-family:'Lucida Sans Unicode', 'Lucida Grande', sans-serif;
font-size:14px;}
h1 {
margin-top:0px;
margin-bottom:8px;
}
/* Links */
a {
text-decoration:none;
color:#1c00ff;
}
a:hover {
color:#5f00e4;
}
fieldset.search {
padding: 0px;
border: none;
width: 232px;
background:#e0e0e0;
}
<fieldset.search:hover {
background: #a8a8a8;
}
.search input, .search button {
border: none;
float: left;
}
.search input.box {
height: 28px;
width: 200px;
margin-right: 0px;
padding-right: 0px;
background: #e0e0e0;
margin: 1px;
}
.search input.box:focus {
background: #e8e8e8 ;
outline: none;
}
.search button.btn {
border: none;
width: 28px;
height: 28px;
margin: 0px;
padding: 0px;
background: url(http://sandbox.runjs.cn/uploads/rs/339/livk7pl5/search_blue.png) no-repeat top right;
}
.search button.btn:hover {
background: url(http://sandbox.runjs.cn/uploads/rs/339/livk7pl5/search_black.png) no-repeat bottom right;
}
/* Article styles */
.article {
}
<html>
<head>
<title>Implement Search Bar</title>
<meta charset="UTF-8">
</head>
<body>
<div>
<h2>Search Bar</h2>
<form method="get" id="searchform" action="http://blog.iliyang.cn/">
<fieldset class="search">
<input type="text" class="box" name="s" id="s" class="inputText" placeholder="Valentine’s Day" x-webkit-speech>
<button class="btn" title="SEARCH"> </button>
</fieldset>
</form>
</div>
<article class="article">
</article>
</body>
</html>
The imagehttps://i.sstatic.net/zFUcw.png
Here is my updated code with the first line changed to HTML5:
body {
font-family:'Lucida Sans Unicode', 'Lucida Grande', sans-serif;
font-size:14px;}
h1 {
margin-top:0px;
margin-bottom:8px;
}
/* Links */
a {
text-decoration:none;
color:#1c00ff;
}
a:hover {
color:#5f00e4;
}
fieldset.search {
padding: 0px;
border: none;
width: 232px;
background:#e0e0e0;
}
fieldset.search:hover {
background: #a8a8a8;
}
.search input, .search button {
border: none;
float: left;
}
.search input.box {
height: 28px;
width: 200px;
margin-right: 0px;
padding-right: 0px;
background: #e0e0e0;
margin: 1px;
}
.search input.box:focus {
background: #e8e8e8 ;
outline: none;
}
.search button.btn {
border: none;
width: 28px;
height: 28px;
margin: 0px;
padding: 0px;
background: url(http://sandbox.runjs.cn/uploads/rs/339/livk7pl5/search_blue.png) no-repeat top right;
}
.search button.btn:hover {
background: url(http://sandbox.runjs.cn/uploads/rs/339/livk7pl5/search_black.png) no-repeat bottom right;
}
/* Article styles */
.article {
}
<!DOCTYPE html>
<head>
<title>Implement Search Bar</title>
<meta charset="UTF-8">
</head>
<body>
<div>
<h2>Search Bar</h2>
<form method="get" id="searchform" action="http://blog.iliyang.cn/">
<fieldset class="search">
<input type="text" class="box" name="s" id="s" class="inputText" placeholder="Valentine’s Day" x-webkit-speech>
<button class="btn" title="SEARCH"> </button>
</fieldset>
</form>
</div>
<article class="article">
</article>
</body>
</html>
The image https://i.sstatic.net/YoClg.png
If anyone can offer assistance, it would be greatly appreciated.