Jump to content

Recommended Posts

Hi all

 

I am using media queries in my css to create a responsive site, when I view the site on a mobile, the site responds as I intend it to.

 

However if I view it on a desktop and resize the screen, it doesn't respond as I would like, the idea is, if I resize  the desktop version enough then I will view the mobile version.

 

in one css file I have

 

 

 
@media screen and(max-width: 1024px) {
 
css styles
 
}

 

and then on another file, I have the following, the idea with this is when I get below the specified screen size the items don't show

 

 

@media screen and (min-width: 1024px) {
 
}

 

if you need any more info let me know.

 

Thanks

 

Mark

Link to comment
https://forums.phpfreaks.com/topic/293043-media-query-not-responding-on-desktop/
Share on other sites

  • 3 weeks later...

Whenever I've seen media queries, they've never used the same number as both the min and max, as that would be rather confusing to the browser I would think..

Try changing the min-width for the desktop version and see what that does.

 

 

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

}
@media screen and(min-width: 1025px) {
 
}

 

Denno

  • 3 weeks later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.