+ 1

How we can set any element width height as per device screen size?

when we open web page in PC similarly open in mobile or tablet!

26th Feb 2017, 6:44 PM
Md.Enam
Md.Enam - avatar
2 Respuestas
0
height: 100vh; width: 100vw; vh = view height vw = view width
26th Feb 2017, 7:16 PM
Melvin2204old
Melvin2204old - avatar
0
height:100%; width:100%; @media and screen (max-width:480px;){ height:100%; width:100%; the top is regular css the bottom is if the screen is less than 480px not that you do not need to write these again. it will still be 100%. the only time you would include these again is if you wanted to change them.
26th Feb 2017, 8:48 PM
Michael Szczepanski
Michael Szczepanski - avatar