I need to create a button with the id #searchBtn
positioned to the left of an input form with the id #searchInput
.
HTML:
header {
position: relative;
z-index: 2;
}
.searchInputMain {
width: 300px;
height: 40px;
}
.searchButton {
width: 200px;
height: 40px;
margin-top: 5px;
}
#searchForm {
position: static;
float: right;
margin-top: 20px;
margin-right: 500px;
}
#searchBtn {
position: static;
float: right;
margin-right: 150px;
}
<header>
<div id="searchForm">
<form>
<input class="searchInputMain">
<button class="searchButton" id="searchBtn" type="submit">
Search
</button>
</form>
</div>
</header>
What steps should be taken to achieve this layout? Which styles are necessary and which are unnecessary?