Question 90


2.5.1 Question

Multiple Choices

You are creating an ASP.NET MVC web application, and you decide to create a new layout for mobile devices with relatively small screens. Which @media query should you create or modify to accomplish the task? (Choose all that apply.)

  • A. @media (max-width:768px)
  • B. @media (max-width:478px) and (orientation:portrait)
  • C. @media (min-width:768px) and (orientation:portrait)
  • D. @media (min-width:1200px)

Answer:

AB
Explanation
A. Correct: This allows for devices with a maximum width of 768 pixels.
B. Correct: This allows for devices with a maximum width of 478 pixels in portrait view, such as tablets.
C. Incorrect: The screen resolution is too large for a typical mobile device.
D. Incorrect: The screen resolution is too large for a typical mobile device.