Responsive Mobile Site | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Responsive Mobile Site

Can someone give me a tip ? I’m building a responsive site and i got a doubt if i build a new specific site to mobile or use media querie. But if i use media querie to max-width: 750 px to adapt to mobile my site get the same size of pixel in any phone (1200px).

15th Jun 2019, 2:50 PM
Matheus Rodrigues
Matheus Rodrigues - avatar
2 Answers
+ 4
I would use media queries to adapt the layout for mobile devices while continuing to share most of the code with the desktop experience. Regarding your concern with high resolution phones, you probably want to add this meta tag to your page's head element: <meta name="viewport" content="width=device-width, initial-scale=1.0"> That will lead to queries for typical mobile device resolutions still evaluating true like you'd want on high resolution phones such as IPhoneX.
15th Jun 2019, 2:59 PM
Josh Greig
Josh Greig - avatar
+ 1
Thanks Josh Greig I understood. Once i have used the tag you mentioned but i didn’t noticed what changed. Becouse i have white “viwport”, i notice now hahahha
15th Jun 2019, 4:31 PM
Matheus Rodrigues
Matheus Rodrigues - avatar