admin管理员组文章数量:1024664
Browser is rendering extra white space on the right side on mobile screens. I tried modifying the following properties without any progress:
html, body {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
}
It still does not remove the extra white space. I also don't see any element overflowing from the side of the grid. Any ideas?
Thanks!
My website: fanismahmalat
Browser is rendering extra white space on the right side on mobile screens. I tried modifying the following properties without any progress:
html, body {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
}
It still does not remove the extra white space. I also don't see any element overflowing from the side of the grid. Any ideas?
Thanks!
My website: fanismahmalat.
Share Improve this question edited Feb 27, 2019 at 11:04 PMerlet 2,5944 gold badges24 silver badges42 bronze badges asked Jan 17, 2019 at 21:13 Fanis MahmalatFanis Mahmalat 7876 silver badges13 bronze badges 3- I checked in Chrome at different window widths - can you be more specific with device/browser and add a screenshot? – DriveItLikeYouStoleIt Commented Jan 17, 2019 at 21:16
- @DriveItLikeYouStoleIt I tried on Samsung mobile in Chrome, and the whitespace appeared! – FZs Commented Jan 17, 2019 at 21:19
- @DriveItLikeYouStoleIt I have a OnePlus3T phone and added screenshot of it. After I scroll the whole page, on the footer, it goes back to normal. – Fanis Mahmalat Commented Jan 17, 2019 at 21:29
2 Answers
Reset to default 6It seems to be something odd happening when switching to mobile with the scrollbar leaving the white space.
I added the following into CSS in the Chrome inspector and it fixed the issue:
html,body
{
width: 100%;
height: 100%;
margin: 0px;
padding: 0px;
overflow-x: hidden;
}
I only tested this in Chrome, and again with the inspector, but this may help. I noticed you had height:1000px
(hardcoded to 1000px). I'm not sure why exactly, but I think you can leave that as such if necessary.
The problem is in the image of the laptop that is exceeding in width. https://i.sstatic/zlg6R.png
Browser is rendering extra white space on the right side on mobile screens. I tried modifying the following properties without any progress:
html, body {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
}
It still does not remove the extra white space. I also don't see any element overflowing from the side of the grid. Any ideas?
Thanks!
My website: fanismahmalat
Browser is rendering extra white space on the right side on mobile screens. I tried modifying the following properties without any progress:
html, body {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
}
It still does not remove the extra white space. I also don't see any element overflowing from the side of the grid. Any ideas?
Thanks!
My website: fanismahmalat.
Share Improve this question edited Feb 27, 2019 at 11:04 PMerlet 2,5944 gold badges24 silver badges42 bronze badges asked Jan 17, 2019 at 21:13 Fanis MahmalatFanis Mahmalat 7876 silver badges13 bronze badges 3- I checked in Chrome at different window widths - can you be more specific with device/browser and add a screenshot? – DriveItLikeYouStoleIt Commented Jan 17, 2019 at 21:16
- @DriveItLikeYouStoleIt I tried on Samsung mobile in Chrome, and the whitespace appeared! – FZs Commented Jan 17, 2019 at 21:19
- @DriveItLikeYouStoleIt I have a OnePlus3T phone and added screenshot of it. After I scroll the whole page, on the footer, it goes back to normal. – Fanis Mahmalat Commented Jan 17, 2019 at 21:29
2 Answers
Reset to default 6It seems to be something odd happening when switching to mobile with the scrollbar leaving the white space.
I added the following into CSS in the Chrome inspector and it fixed the issue:
html,body
{
width: 100%;
height: 100%;
margin: 0px;
padding: 0px;
overflow-x: hidden;
}
I only tested this in Chrome, and again with the inspector, but this may help. I noticed you had height:1000px
(hardcoded to 1000px). I'm not sure why exactly, but I think you can leave that as such if necessary.
The problem is in the image of the laptop that is exceeding in width. https://i.sstatic/zlg6R.png
本文标签: javascriptHow to remove extra white space from website when viewed on mobile browserStack Overflow
版权声明:本文标题:javascript - How to remove extra white space from website when viewed on mobile browser - Stack Overflow 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745614125a2159181.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论