Search code examples
htmlcssipadmedia-queries

Site not responsive on IPAD, media queries not working


I have an issue, the website I build is responsive on phones but is not on IPAD

This is the media query I am using :

@media screen and (max-device-width: 768px) {
..
}

and at the top of my templates after the doctype declaration I have :

<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

Can someone help me out please ?

Thank you !


Solution

  • I think you need to change this:

    @media screen and (max-device-width: 767px)
    

    to this:

    @media screen and (max-device-width: 768px)
    

    Since the iPad screen is 768 pixels wide.