Search code examples
htmlcssresponsive-design

Responsive web design is working on desktop but not on the mobile device


The responsive design works in inspect elements emulator, but on a mobile device, it doesn't show the desired output.

The HTML:

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Esmaeeil enani</title>
    <link rel="stylesheet" type="text/css" media="screen" href="CVStyle.css" />
    <!--Online Font Awesome Call-->
    <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css" integrity="sha512-+4zCK9k+qNFUR5X+cKL9EIR+ZOhtIloNl9GIKS57V1MyNsYpYcUrUeQc9vNfzsWfV28IaLL3i96P9sdNyeRssA==" crossorigin="anonymous"/>
</head>

The CSS:

@media only screen and (max-width: 1290px) {
    .skills .skill-item {
        margin-bottom: 30px;
    }
}

@media only screen and (max-width: 1024px) {

}

There is more to the code, but this is the simplified version.

this how it looks on the desktop (inspect mode) Pic 1 Pic 2

this how it looks on a mobile device (iPhone) on iPhone pic 1 on iPhone pic 2

It looks bad only on iPhone devices


Solution

  • The problem is with the .grid css rule.

    You need to change height:100% to min-height:100%