页面超出屏幕边缘 [英] Page extends past edge of screen

查看:29
本文介绍了页面超出屏幕边缘的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我第二次遇到这个问题,我正要拔头发试图修复它.我正在创建一个网站,并且刚刚开始.在 css 中,我将 htmlbody 标签的边距和内边距设置为 0,页面延伸到屏幕的右边缘.

This is the second time I have run into this issue and I am about to pull my hair trying to fix it. I am creating a website and just getting on the beginnings of it. In the css I set the margins and the padding for the html and body tags to 0 and the page extends past the right edge of the screen.

我尝试修改这些元素的 css 以包含 100% 的宽度,但水平滚动条仍然存在并且页面仍然超出屏幕边缘.

I tried modifying the css for these elements to include a 100% width, but the horizontal scroll bar is still there and the page is still past the edge of the screen.

我也尝试将 overflow 值设置为隐藏,但正如预期的那样,这只带走了滚动条.很明显,页面仍然超出了屏幕的右边缘.

I also tried setting the overflow value to hidden, but just as expected, that only took away the scroll bar. It was obvious the page was still extended past the right edge of the screen.

有什么想法吗?

推荐答案

只需要去掉navigation_bar div上的width:100%

just remove the width:100% on the navigation_bar div

这篇关于页面超出屏幕边缘的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆