I'm having a weird problem displaying my webpage on mobile Chrome. I have a horizontal block and it just displays on desktop Chrome, but on mobile Chrome it attaches to the left border of the page.
After some research, I realized that there is a mobile “viewport” that is different from the screen size. Thus, the task is not just to focus.
The simplified markup that I use:
<body>
<div class="block">
</div>
</body>
And CSS:
body {
width: 100%;
margin: 0;
}
.block {
position: relative;
width: 1024px;
height: 768px;
background-color: red;
top: 44px;
margin: auto;
}
I also tried to center the block using:
left: 50%;
margin-left: -512px;
position: absolute;
But it has the same effect. I also tried adding metadata to the viewport:
<meta name="viewport" content="width=device-width, initial-scale=1">
.
1920x1080, ~ 1200 , " " 640 , , - .
- (1200 ) , . " " ... ( , , ).
, : http://37.48.93.204/androidtest.htm
Chrome, Android Chrome.