Utilizing Media Queries for Responsive Design
Media queries are a powerful tool that allows you to dynamically adjust CSS styles based on various factors such as device type, screen resolution, or viewport width.
In your scenario, it would be beneficial to use media queries to target the viewport's width in order to make adjustments to the search engine's presentation.
@media only screen and (max-width:600px) { // Apply styles for screens narrower than 600px
.search-head {
// Here is a suggested modification, feel free to customize further.
width: auto;
margin-left: 5vw;
margin-right: 5vw;
}
}
You can define specific widths for the search engine based on different screen sizes:
@media only screen and (max-width:1200px) {
.search-head {
width: 30vw;
}
}
@media only screen and (max-width:900px) {
.search-head {
width: 40vw;
}
}