Javascript html5 css右侧额外空白

Javascript html5 css右侧额外空白,javascript,css,html,removing-whitespace,Javascript,Css,Html,Removing Whitespace,这很奇怪。。。如果像这样完全打开的话 但是当我看到右边有一个空的空间。它是从哪里来的 我的心一下子全碎了 如果有人能帮忙,这是我的html: <html> <head> <title>GoodInsight Training Solutions</title> <link rel="stylesheet" type="text/css" href="css/customer-page.css" /> </head>

这很奇怪。。。如果像这样完全打开的话

但是当我看到右边有一个空的空间。它是从哪里来的

我的心一下子全碎了 如果有人能帮忙,这是我的html:

<html>
<head>
<title>GoodInsight Training Solutions</title>

<link rel="stylesheet" type="text/css" href="css/customer-page.css" />

</head> 
<body>

<div id="nav-panel"> 
<!-- top div is navigation menu started -->
<a class="normal" href="index.html" /> Home </a>
<a class="normal" href="#about-us" /> About Us </a>
<a class="normal" href="class-training.html" /> Home Training </a>
<a class="normal" href="class-training.html" /> Class Training </a>
<a class="normal" href="trainer.html" /> Trainer </a>
<a class="normal" href="login.html" /> Sign Up/Login </a>
<a class="vendor" href="vendor-page.html" /> Vendor </a>

<!-- bottom div is navigation menu ended -->
</div>

<div id="search-panel"> 
<!-- top div is search box started -->
<form action="class-training.html" method="post" >
<img src="images/title_good_expert_big.png"/> <br/>
<input type="text" placeholder="Kata Pencarian" /> 
<input id="search-button" type="submit" value="" /> 
</form>
<!-- bottom div is search box ended -->
</div>


<div id="center">
        <!-- top div is center started -->
    <h2> Trainings </h2>

        <div class="trainings" >
        <!-- top div is training started -->
            <img src="images/item-training8.png" />

            <div class="training-desc">
                <a href="#"> Title is over here  <img src="images/play.png" /> </a>
            </div>

        <!-- bottom div is training ended  -->
        </div>

        <div class="trainings" >
        <!-- top div is training started -->
            <img src="images/item-training7.png" />

            <div class="training-desc">
                <a href="#"> Title is over here  <img src="images/play.png" /> </a>
            </div>

        <!-- bottom div is training ended  -->
        </div>

        <div class="trainings" >
        <!-- top div is training started -->
            <img src="images/item-training6.png" />

            <div class="training-desc">
                <a href="#"> Title is over here  <img src="images/play.png" /> </a>
            </div>

        <!-- bottom div is training ended  -->
        </div>

        <div class="trainings" >
        <!-- top div is training started -->
            <img src="images/item-training5.png" />

            <div class="training-desc">
                <a href="#"> Title is over here  <img src="images/play.png" /> </a>
            </div>

        <!-- bottom div is training ended  -->
        </div>

        <div class="trainings" >
        <!-- top div is training started -->
            <img src="images/item-training1.png" />

            <div class="training-desc">
                <a href="#"> Title is over here  <img src="images/play.png" /> </a>
            </div>

        <!-- bottom div is training ended  -->
        </div>

        <div class="trainings" >
        <!-- top div is training started -->
            <img src="images/item-training3.png" />

            <div class="training-desc">
                <a href="#"> Title is over here  <img src="images/play.png" /> </a>
            </div>

        <!-- bottom div is training ended  -->
        </div>

        <div class="trainings" >
        <!-- top div is training started -->
            <img src="images/item-training2.png" />

            <div class="training-desc">
                <a href="#"> Title is over here  <img src="images/play.png" /> </a>
            </div>

        <!-- bottom div is training ended  -->
        </div>

        <div class="trainings" >
        <!-- top div is training started -->
            <img src="images/item-training4.png" />

            <div class="training-desc">
                <a href="#"> Title is over here  <img src="images/play.png" /> </a>
            </div>

        <!-- bottom div is training ended  -->
        </div>

        <!-- bottom div is center ended --> 
</div>

<div id="about-us">
<!-- top div is about-us started -->    
<h2>Address</h2>
<p>
Green Office Park 9 </br>
Ground Floor </br>
BSD - Greater Jakarta </br>
<span>Copyright Purwadhika 2017  |  All Right Reserved </span>
</p>

<!-- bottom div is about-us ended -->   
</div>

<div id="contact">
<!-- top div is contact started --> 
<h2>Contact</h2>
<p>
(022) 1234-12345</br>
training@goodxpert.com </br>
</p>

<!-- bottom div is contact ended -->    
</div>

</body>

</html>
body{
    background-image: url("../images/bg1_small.jpg");
    background-repeat: no-repeat;
    background-size: 100%;
}

a{
    border: 1px solid rgba(255,255,255,.2);
    text-decoration: none;
    display: table-cell;
    text-align: center;

    vertical-align: middle;
    height: 60px;
    width: 100px;
    color: white;
    background-image: url("../images/trans1_blue.png");
    z-index: 1;
}

.normal:hover
{
    text-decoration: underline;
    background-image: url("../images/trans1_black.png");
}

.vendor:hover
{
    text-decoration: underline;
    background-image: url("../images/trans1_red.png");
}

#nav-panel{
    border-top-style: solid;
    border-left-style: solid;
    width: 100%;
    height: 60px;
    display: table; 
    margin-right: auto;
    margin-left: -7px;
    margin-bottom: 0;
    margin-top: -7px;
    position: fixed;
    z-index : 1;
}

#search-button{
    position: absolute;
    cursor:pointer;
    background: url("../images/search.png") no-repeat;  
    height: 32px;
    width: 32px;
    border: none;
    outline:none;
}

#search-panel{
    padding-top: 75px;
    position: absolute;
    top: 50%;
    left: 50%;

    margin-top: -10em; /*set to a negative number 1/2 of your height*/
    margin-left: -25em; /*set to a negative number 1/2 of your width*/
    background-image: url("../images/trans1_blue.png");
    width: 900px;
    height: 250px;
    text-align: center;
}

#search-panel input {
    margin-top : 20px;
    width: 560px;
    height: 30px;
    margin-right: 15px;
}

#search-panel span {
    font-size: 45px;
    color: white;
}

#search-panel img {
    margin-top: -30px;
}

#center{
    position: absolute;
    top: 670px;
    bottom : 0px;
    margin-left: 150px;
    margin-top: 120px;
    height: 100%;
    width: 900px;
}


.trainings {
    margin-left: 10px;
    margin-bottom: 20px;
    display: inline-block;

    height: 235px;
    width: 200px;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.5), 0 6px 20px 0 rgba(0, 0, 0, 0.2);
}

.training-desc{
    background:url("../images/item_training_title_bg.png") no-repeat;
    color: white;
    font-weight: bold;
    height: 15%;
    opacity: 0.6;
    text-align: center;
}

.training-desc a {
    padding-top: 5px;
    text-decoration: none;
    color: white;
    width: 300px;
    height: 40px;
}

.training-desc a:hover{
    text-decoration: underline;
    color: black;
}

.training-desc img {
    vertical-align: middle;
}



#about-us {
    font-size: 24px;
    position: absolute;
    top: 1270px;
    bottom : 0px;
    margin-left: 150px;
    padding-top: 320px;
    height: 450px;
    width: 900px;
}


#contact {
    font-size: 24px;
    position: absolute;
    top: 1570px;
    bottom : 0px;
    margin-left: 150px;
    padding-top: 320px;
    height: 450px;
    width: 900px;
}

html,body
{
    min-width: 100%;
    background-size: contain;
    width: 100%;
    height: 100%;
    margin: 0px;
    padding: 0px !important;
    overflow-x: hidden; 
}

更改您的css,如下面给出的html、正文(css中的第159行):


html,body{width:100%;height:100%;}
body{background size:cover}
我想没有人会下载你的zip。您应该提供一个工作代码段。你的HTML是不正确的<代码>
应该是

../>主页
应该是
…>主页
。没有
/
。我已经用那种方式编辑了。。。但这不是问题所在。我查看了firefox的最新版本。它仍然显示出奇怪的空白。但在chrome中,它并没有出现。无论如何,谢谢你提醒我@patrick,。。。还有什么我可能忘记的事情吗我需要把这些代码放在css的最上面。。。谢谢你,伙计!你是救世主D
html,body
{
    min-width: 100%;
    width: 100%;
    height: 100%;
    margin: 0px;
    padding: 0px !important;
    overflow-x: hidden; 
}