Is there a way to adjust the layout of an HTML structure for both desktop and responsive mode?
https://i.sstatic.net/skAP5.jpg
<div class="header grid py-3">
<div class="logo_and_title grid">
<div class="logo grid">
<a id="logoid" href="/" class=" me-3"><img src="logo.png" width="100%" class="img-fluid" ></a>
<h1 id="nameid">Title of website</h1>
</div>
</div>
<div class="menu">
<!-- list of menu items-->
</div>
<div>
This is the CSS code for desktop:
.grid{
display: grid;
}
.logo_and_title.grid{
grid-template-columns: 3fr 7fr;
grid-gap:1rem;
}
.logo.grid{
grid-template-columns: 2fr 7fr;
}
#nameid,#logoid,.menu{
align-self: center;
}
header{
width:100%;
}