Browser is scaling page to 125%
Finally I found an answer.
For Firefox:
https://stackoverflow.com/a/24958483/6552578
Chrome:
https://productforums.google.com/forum/#!topic/chrome/_jmREHlt3ZE
Solution - need to edit desktop link to Chrome like that:
"C:\Program Files\Google\Chrome\Application\chrome.exe" /force-device-scale-factor=1
Force Zoom-Level/DPI-Scale with CSS, Header-Tag or JavaScript
You can check the browser dpi level with javascript and zoom the page contents accordingly with css(if needed).
if(window.devicePixelRatio == 1 )
$("body").addClass("zoom2x")
Where zoom2x is a css class.
.zoom2x{
zoom: 200%; /* all browsers */
-moz-transform: scale(2); /* Firefox */
}
You may crosscheck your current dpi setting here and verify results.
Change windows dpi setting C#
You can do this by modifying the registry value of the registry key HKEY_CURRENT_USER\Control Panel\Desktop:LogPixels
. The type is REG_DWORD
.
You can see the Registry methods here to help how to modify the registry values.
Setting the value to 96 (0x60) corresponds setting the DPI settings to "Smaller" (100%).
- 96 is "Smaller" (100%),
- 120 is "Medium" (125%),
- 144 is "Larger" (150%).
Note that the computer may still require a reboot or logout/login to make everything work as expected with that setting.
Related Topics
Why Does Display: -Ms-Flex; -Ms-Justify-Content: Center; Not Work in Ie10
How to Target CSS for iPad But Exclude Safari 4 Desktop Using a Media Query
Flexbox: How to Get Divs to Fill Up 100% of the Container Width Without Wrapping
How to Show the First N Elements of a Block and Hide the Others in CSS
How to Generate a Box-Shadow That Follows the Shape of a Clip-Path Polygon
CSS Gradient Checkerboard Pattern
Load Fonts with Webpack and Font-Face
What Is -Webkit-Focus-Ring-Color
Apply CSS Rules If Browser Is Ie
Linear-Gradient to Transparent Bug in Latest Safari
How to Validate CSS on Internal Web Pages
What's the Difference Between Visibility: Hidden and Visibility: Collapse in Flexbox
CSS Gradient for Triangle Shaped Arrow
Background-Image: for :Visited Links