Media queries between two resolutions

Mobile Technologies Mobile Computing 3 years ago

1.46K 1 0 0 0

_x000D_ _x000D_ I was searching how to make that a hidden section shows up to user if the resolution of his/her screen is like this: if width < 1024px and height < 640px and min width 1440px and height < 900px then show the div. I've been struggling with min-widths, max-heights, but no luck on this. For example: @media screen (max-width: 1023px) and (max-height: 639px), and (min-width: 1440px) and (max-height: 899px) But it doesn't work, as expected while I was building it. Any ideas on how to achieve that?

User submissions are the sole responsibility of contributors, with TuteeHUB disclaiming liability for accuracy, copyrights, or consequences of use; content is for informational purposes only and not professional advice.

Answers (1)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 3 years ago
_x000D_ I'm using the following: /* ----------- 0 - 450px ----------- */ @media screen and (max-width: 450px){ } /* ----------- 450 - 650px ----------- */ @media screen and (min-width: 451px) and (max-width: 650px){ } /* ----------- 650px - 950px ----------- */ @media screen and (min-width: 651px) and (max-width: 950px){ } /* ----------- 950px - 1200px ----------- */ @media screen and (min-width: 951px) and (max-width: 1200px){ } /* ----------- 1200px + ----------- */ @media screen and (min-width: 1201px){ } Works as good as gold if you use this in your HTML: Adjust for height and you should be set.
1 views
0 shares

No matter what stage you're at in your education or career, TuteeHUB will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.

Similar Forum


Q

Would Firebase be a good choice as a server for the Flutter mobile game I'm creating?

_x000D_ _x000D_ I am building a turn-based Flutter game. Would Firebase be a good choice as a server...
Q

Implement Bottom Navigation activity along with a VerticalViewPager with nested Cardview in Android...

_x000D_ _x000D_ I want to develop an Android App which will have a Bottom Navigation Bar and above i...
Q

(JS) For , determine if the device offers or not to capture a photo from the camera

_x000D_ _x000D_ When uploading a file, I need to give the user the possibility: upload the file fr...

Important Mobile Technologies Links