I have successfully implemented a dropdown menu with both text and an icon. However, I am now faced with the challenge of removing the text while retaining the icon when the screen width is reduced to a maximum of 768px. Is it possible to modify the content of the div dynamically based on the screen size, or should I consider creating another div and toggling their visibility according to the screen width?
Below is the code snippet used for my dropdown:
<button onclick="myFunction()" class="dropbtn">My List <i class="fa fa-arrow-circle-down" aria-hidden="true"></i></button
My goal is to eliminate the text and only display the icon.
Any suggestions or guidance would be greatly appreciated!