Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Difference between these two media queries (max-width, min-width).

Enthusiast ,
May 03, 2019 May 03, 2019

Hi,

What is the difference between max-width and min-width in the case below?

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

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

Hosun Kang

Tittle was edited by Moderator.

428
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , May 03, 2019 May 03, 2019

In the 1st  code example, everything under & including 1024px wide  is effected by your style rule.

In the 2nd example,  everything higher than & including 1024 is effected by your style rule. To avoid conflicts, use 1025px in your 2nd media query.

Translate
Community Expert ,
May 03, 2019 May 03, 2019
LATEST

In the 1st  code example, everything under & including 1024px wide  is effected by your style rule.

In the 2nd example,  everything higher than & including 1024 is effected by your style rule. To avoid conflicts, use 1025px in your 2nd media query.

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines