How can I make the search bar smaller instead of letting it overlap with the logo image or to make it width bigger when increasing the screen size? At the moment it stays the same size at any screen I make.
My CSS:
.header {
display: flex;
flex-direction: row;
padding-top: 20px;
padding-left: 10px;
background: white;
}
.header h1 {
font-size: 30px;
padding-right: 10px;
width: 30%;
}
#search-bar {
width: 60%;
height: 40px;
font-size: 1rem;
border: 1px solid #D0CFCE;
border-top-left-radius: 20px;
border-bottom-left-radius: 20px;
}
#search-button {
height: 40px;
font-size: 1rem;
border: 1px solid #D0CFCE;
border-top-right-radius: 20px;
border-bottom-right-radius: 20px;
}
.header form {
display: flex;
justify-content: center;
align-items: center;
}
My HTML:
<div class="header">
<h1>
<a href="home"><img src="" alt="Company Logo"></a>
</h1>
<form action="search">
<input type="text" id="search-bar" placeholder="Search anything...">
<button type="submit" id="search-button">Search</button>
</form>
</div>