problem description
Today, I encountered a problem when I was doing the search box. For details, see the code. Both the left and right blocks are floated to do it, but why not fill it up? why is there a small black bar?
the environmental background of the problems and what methods you have tried
I know that it can be solved if the background color and border are set to the same color. I just want to know why this little black bar appears
.related codes
/ / Please paste the code text below (do not replace the code with pictures)
.search-bar {
width:600px;
border: 2px solid -sharpdd182b;
background: black;
}
.search-bar input,
.search-bar button {
border: 0px;
padding: 10px;
float: left;
display: block
}
.search-bar input {
width: 80%;
}
.search-bar button {
/* outline: none; */
width: 20%;
background: -sharpdd182b;
color: -sharpfff;
}
<div class="search-bar">
<input type="text" name="" value="">
<button type="button" name="button"></button>
</div>
what result do you expect? What is the error message actually seen?
is the small black edge on the right