I recently encountered an issue with the code found on this website (the repository can be viewed on Github here):
@media only screen and (max-width: 600px) {
img {width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
a.box {
width: 100%;
padding:14px 15px;
font-size: 0.75em;
}
}
Despite setting the maximum screen width to 600px, I noticed that it doesn't trigger properly on my iPhone 7 Plus:
https://i.sstatic.net/z3KBU.jpg
Even when using Firefox's Responsive Design mode for iPhone 7/8/9 Plus, the issue persists:
https://i.sstatic.net/BCFpS.png
Strangely enough, resizing the Firefox window by just one pixel seems to resolve the problem:
However, when adjusting my browser window to match the size of an iPhone 6/7/8 exactly, the code works fine. This suggests that the issue might be related to the iPhone user-agent-string. Any thoughts on how to address this?
https://i.sstatic.net/BZm66.png
Any insights on what could be causing this and how to fix it would be greatly appreciated.