exam questions

Exam 70-486 All Questions

View all questions & answers for the 70-486 exam

Exam 70-486 topic 5 question 2 discussion

Actual exam question from Microsoft's 70-486
Question #: 2
Topic #: 5
[All 70-486 Questions]

You are developing an ASP.NET MVC application. Devices that use many different browsers will use the application.
You have the following requirements:
✑ Content must display correctly when a device is in landscape or portrait orientation.
✑ Content must not scale when the device orientation changes.
✑ Content must be displayed by using the maximum available screen space.
✑ The application must render properly in Internet Explorer 8 or later versions.
You need to configure the application.
Which two actions should you perform? Each correct answer presents part of the solution.

  • A. Use JavaScript to evaluate the window.innerWidth and window.innerHeight properties.
  • B. Set the value of the width property for the viewport meta tag to device-width.
  • C. Use CSS to target the HTML element on each page. Set the values of the width and height properties to 100%.
  • D. Use CSS media queries to target screen size, device orientation, and other browser capabilities.
Show Suggested Answer Hide Answer
Suggested Answer: BD 🗳️
B: If you want the viewport width to match the devices physical pixels, you can specify the following:
<meta name="viewport" content="width=device-width">
For this to work correctly, you must not explicitly force elements to exceed that width (e.g., using a width attribute or CSS property), otherwise the browser will be forced to use a larger viewport regardless.
D: Media queries in CSS3 extend the CSS2 media types idea: Instead of looking for a type of device, they look at the capability of the device.
Media queries can be used to check many things, such as:
width and height of the viewport
width and height of the device
orientation (is the tablet/phone in landscape or portrait mode?) resolution
Using media queries are a popular technique for delivering a tailored style sheet to tablets, iPhone, and Androids.
References:
https://www.asp.net/whitepapers/add-mobile-pages-to-your-aspnet-web-forms-mvc-application http://www.w3schools.com/css/css3_mediaqueries.asp

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
mvn
Highly Voted 5 years, 4 months ago
CSS media queries do not work in IE8...
upvoted 5 times
ozner16
5 years, 3 months ago
so answers should be BC?
upvoted 1 times
...
zimzimzimma
5 years ago
good catch. It should be B and C then.
upvoted 2 times
...
DB1984
4 years, 11 months ago
But mentions that ie8 or later versions isn’t it?but not Ie8 and later versions
upvoted 2 times
...
bdb1993
4 years, 9 months ago
"The application must render properly in Internet Explorer 8 or later versions." I think OR is an important word here
upvoted 1 times
...
...
zimzimzimma
Most Recent 5 years ago
Answer should be B and C.
upvoted 4 times
...
pizzaHawai
5 years ago
Media queries are not supported in IE8: https://stackoverflow.com/a/5771312/4884274 Innerwidth and innerHeight are also not supported for IE8: https://www.geeksforgeeks.org/javascript-window-innerwidth-and-innerheight-properties/ which means B is definitely correct. About C I am not sure since the question says that content should not scale when the device orientation changes. Setting width and height to 100% isn't valid option according this rule..? But since MS mostly ask for 2 questions I guess it's B and C
upvoted 1 times
...
mindzia
5 years, 1 month ago
Maybe D is correct because of "Use ..., and OTHER BROWSER CAPABILITIES. " ???
upvoted 1 times
northgaterebel
4 years, 5 months ago
I agree. B supports IE8. D supports newer/other browsers.
upvoted 1 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...