Screen Resolution not showing right images iPhone7

HTML, CSS and anything else that deals with client side capabilities.

Moderator: General Moderators

Post Reply
simonmlewis
DevNet Master
Posts: 4435
Joined: Wed Oct 08, 2008 3:39 pm
Location: United Kingdom
Contact:

Screen Resolution not showing right images iPhone7

Post by simonmlewis »

Hi
I have this code:

Code: Select all

<img
 srcset='/images/-websites_475.jpg 475w, 
/images/-websites_768.jpg 768w, 
/images/-websites_1024.jpg 1024w,
/images/-websites.jpg 1920w,
/images/-websites.jpg 2560w'
 sizes='(max-width: 475px) 475px,
            (max-width: 768px) 768px,
            (max-width: 1024px) 1024px,
            (max-width: 1920px) 1920px,
            (max-width: 2560px) 2560px'
 src='/images/-websites.jpg' alt='easy websites' />
On an iphone7 it is NOT showing the 475 version, but the 1024 version, but it is using the max-width 768px CSS.

How is that possible?
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
Post Reply