Reputation: 23323
I'm creating responsive web app for desktop and mobile devices. My problem is I don't know when I need to use *-device-width
. Pls explain usecases for *-device-width
. Why should I use it instead of *-width
?
Upvotes: 0
Views: 110
Reputation: 2116
From Difference between width and device-width in CSS media queries:
device-width
is the...width of the output device (meaning the entire screen or page, rather than just the rendering area, such as the document window).
The
width
...describes the width of the rendering surface of the output device (such as the width of the document window, or the width of the page box on a printer)
Upvotes: 0
Reputation: 339
You use it with a meta tag, which you will add to your head tag
<meta name="viewport" content="width=device-width" />
Upvotes: 1