css - Changing width and height in html -


the width , hight of following code change, on change of resolution of different devices.

<div style="background-color:orange;height:125px;width:75px;"> div has height , width applied. </div> 

is there way prevent change of width , height , make retain same width , height resolution.

note: have tried zooming ( in , out ) html page changes width , height of div.

you need add viewport meta between head tags:

<meta name="viewport" content="initial-scale=1">

http://webdesign.tutsplus.com/articles/quick-tip-dont-forget-the-viewport-meta-tag--webdesign-5972


Comments

Popular posts from this blog

c++ - How to add Crypto++ library to Qt project -

jQuery Mobile app not scrolling in Firefox -

How to use vim as editor in Matlab GUI -