So I have a search box on my page. On page load it looks like this:
However, after typing any text, and then deleting it, the box looks like this:
Upon entering new text, the border with go away and look like the original state.
I do not believe the CSS is altering it in any way as these events occur
.search {
padding: 8px 15px;
background: rgba(50, 50, 50, 0.2);
border: 1px solid #dbdbdb;
}
.search:hover {
background: rgba(0, 0, 0, .3);
}
.search:focus {
background: rgba(0, 0, 0, 0);
}
.button {
position: relative;
padding: 6px 15px;
left: -8px;
border: 2px solid #207cca;
background-color: #207cca;
color: #fafafa;
font-size: 12px;
cursor: default;
}
.button:hover {
background-color: #fafafa;
}
The border that appears is a style on many of the DIVs in the document however, they should not apply to the search box.
EDIT: This is not an example of the outline appearing. The outline only appears after the search box loses focus (I click elsewhere on the page). The outline will also disappear as text is being entered. EDIT #2: here's the relevant HTML:
<td style="min-width:254px">
<input type="text" placeholder="Search..." required class="search">
<input type="button" value="Search" class = "button">
<script>
$('.button').click(search);
$('.search').keypress(function(e)
{
var code = (e.keyCode ? e.keyCode : e.which);
if(code == 13)
{
search();
}
});
function search()
{
window.location.href = "country.html/?country=" + $('.search').val().toLowerCase();
}
</script>
</td>