What’s happening is that the search form ends up stacking behind the page header. You could fix this by adding z-index to your custom CSS:
#searchform {
position: absolute;
top: 25px;
right: 10px;
text-align: right;
z-index: 10;
}
Because you’re taking it out of the document flow when you use position: absolute
, you might need to reposition it at different screen sizes using media queries:
@media screen and (max-width: 500px) {
#searchform {
position: absolute;
top: 25px;
right: 10px;
z-index: 10;
}
}
@media screen and (min-width: 501px) and (max-width: 1200px) {
#searchform {
top: 35px;
right: 35px;
}
}
With this code, if the browser window is less than 500px wide, the search form will be positioned 25px from the top and 10px from the right, and if the browser window is between 501px and 1200px wide, the search form will be positioned 35px from the top and from the right.