+ 1
How can i avoid the <br> tag by media query in my Templete.
I have to use the <br> tag for my Desktop view but now i want to avoid the <br> tag for my mobile view. So how i do that? please help.
1 Antwort
0
Use javascript.
check for window width first with
window.innerWidth;
if that's smaller than desktop
let brTag = document.createElement("br");
Then get the tag you want with id and append the br tag to it.
for example:
let exDoc = document.getElementById("randomTag");
exDoc.appendChild(brTag);
Hope this helps😅.