css get height of screen resolution
Question by FishBowlGuy
im having a hard time getting the height of lower screen resolution because my screen resolution is 1920×1080 does anyone know how to get the height and width screen resolution?
because my friend has 1024×768 resolution when he checked my work into his computer, its all messed up, this is my only problem when it comes to CSS the height and width.
Answer by Starx
It is not possible to get the height of the screen from CSS. However, using since CSS3 you can use media queries to control the display of the template as per the resolution.
If you want to code on the basis of height using media queries, you can define style-sheet and call it like this.
<link rel="stylesheet" media="screen and (device-height: 600px)" />