Media Queries does not work

Asked

Viewed 2,712 times

4

I am developing a Wordpress site that needs to be responsive and for that I am using media queries:

<head>
...
<link rel="stylesheet" href="css/style.css"/>
<link rel="stylesheet" href="css/mobile.css" media="screen and (max-width: 768px)">
...
</head>

When testing it on mobile devices however it is not calling the css from the mobile file.css. What should I do? The site is this one

1 answer

3


Try using media query inline in your mobile.css

Example: Use-media-query-inline-style

@media only screen and (max-device-width: 480px) { /* Change to whatever media query you require */
    .bg {
         background: url(background_highres.jpg);
    }
}

Browser other questions tagged

You are not signed in. Login or sign up in order to post.