I currently have a navigation bar with the left side dedicated to navigation items and the right side featuring a whatsapp icon.
<mat-toolbar class="nav">
<a routerLink="app-aaa" mat-button>aaa</a>
<a routerLink="app-bbb" mat-button>bbb</a>
<a routerLink="app-ccc" mat-button>ccc</a>
<a routerLink="app-ddd" mat-button>ddd</a>
<a routerLink="app-eee" mat-button>eee</a>
<a routerLink="app-fff" mat-button>fff</a>
<a routerLink="app-ggg" mat-button>ggg</a>
<a routerLink="app-hhh" mat-button>hhh</a>
<span><a href="https://api.whatsapp.com//send?phone=1234567890">
<svg viewBox="0 0 32 32" class="whatsapp-ico">
<path
d=" M19.11 17.205c-.372 0-1.088 1.39-1.518 1.39a.63.63 0 0 1-.315-.1c-.802-.402-1.504-.817-2.163-1.447-.545-.516-1.146-1.29-1.46-1.963a.426.426 0 0 1-.073-.215c0-.33.99-.945.99-1.49 0-.143-.73-2.09-.832-2.335-.143-.372-.214-.487-.6-.487-.187 0-.36-.043-.53-.043-.302 0-.53.115-.746.315-.688.645-1.032 1.318-1.06 2.264v.114c-.015.99.472 1.977 1.017 2.78 1.23 1.82 2.506 3.41 4.554 4.34.616.287 2.035.888 2.722.888.817 0...
</svg>
</a></span>
</mat-toolbar>
The corresponding CSS styles are:
.whatsapp-ico{
fill: white;
width: 24px;
height: 24px;
padding: 3px;
background-color: #4dc247;
border-radius: 50%;
box-shadow: 2px 2px 6px rgba(0,0,0,0.4);
z-index: 10;
}
.whatsapp-ico:hover{
box-shadow: 2px 2px 11px rgba(0,0,0,0.7);
}
.nav {
background-color: lightgray;
font-weight: 700;
font-size: 24px;
text-decoration: none;
color: #fff;
}
.nav span {
margin-left: 25%;
}
While this layout works well on desktop screens where all items are in one row, it is not responsive when viewed on smaller screens such as phones. The icon disappears and some navigation items become cut off. How can I make this design responsive for different screen sizes?