[英]HTML, CSS: Extra space in the body
I'm building a website but for some reason there is extra space in the body width.我正在建立一个网站,但由于某种原因,主体宽度有额外的空间。 I used
margin-left: 0
but that didn't help.我使用了
margin-left: 0
但这没有帮助。
Result of my code: https://chezzles-shreyas1703.c9users.io/index.html我的代码结果: https : //chezzles-shreyas1703.c9users.io/index.html
Thank you in advance!先感谢您!
Change the margin-left
to 5%
or 20px
.将
margin-left
更改为5%
或20px
。 Currently it set to 13%
.目前它设置为
13%
。
.main-content {
margin-left: 5%;
}
Or或者
.main-content {
margin-left: 20px;
}
If I understand what you are saying I am pretty sure your issue lies with the margin-left
property on your .main-container
class如果我明白你在说什么,我很确定你的问题在于你的
.main-container
类的margin-left
属性
.main-content {
margin-left: 13%;
}
At media screen of max-width : 850px, you have given your section a width of 100% change it to max-width.
在 max-width : 850px 的媒体屏幕上,您已经为您的部分设置了 100% 的宽度,将其更改为 max-width。
@media screen and (max-width: 850px)
section {
position: absolute;
max-width: 100%;
left: 0;
top: 0;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.