+ 4

Different resolution ?

How can you create a website compatible with multiple resolutions? when i create a site in the playground with my phone then i open it with my computer it's different and when i edit it with my computer it's the same thing. what is the solution?

5th Apr 2018, 8:12 PM
Amine Trabelsi
Amine Trabelsi - avatar
3 Answers
+ 2
modern phones have higher resolutions than desktop monitors (retina displays have twice the amount of pixels on the same area). 1. use relative units (%,em,rem,vh/vw); 2. use media queries (@media in CSS) to select different pics and styles depending on screen size and resolution. (js useragent helps to do that too, but CSS is faster).
6th Apr 2018, 1:53 AM
wenz
wenz - avatar
+ 2
Use more relative values then absolute (more 80% then 80px)
5th Apr 2018, 8:13 PM
Cyan
+ 2
You could also use bootstrap or APIs that use column layout in order to be mobile friendly
5th Apr 2018, 10:14 PM
Ariela
Ariela - avatar