简体   繁体   中英

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.

Result of my code: https://chezzles-shreyas1703.c9users.io/index.html

Thank you in advance!

Change the margin-left to 5% or 20px . Currently it set to 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-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.

@media screen and (max-width: 850px)
section {
    position: absolute;
    max-width: 100%;
    left: 0;
    top: 0;
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM