I am building my web application on my laptop but when I navigate the page on my desktop pc the layout of the div are distorted.
I think the solution is giving percentage instead of absolute numbers like 240px to height and width of divs.
What do you think ?
Do you have another recommendations ?
Thanks in advance.
What I’ve done is :
<div style="height:240px;width:240px"></div>
What I think I have to do is :
<div style="height:100%;width:90%"></div>
When using relative sizing ‘px’ rather than absolute ‘pt’, the browser approximates the size which can alter your layout depending on user settings for ‘zoom’ or text-size’ levels, browser version etc.
If you absolutely size the layout div using points (pt), you should not see changes based on browser, screen resolution etc.
Try
Great reference on relative vs absolute font management here