1
我在我的工具欄下方的右側找到了這張神祕的白色空間,旁邊有一張我應該延伸到邊緣的圖片。它幾乎就像我的導航欄延伸太遠了。我幾乎沒有注意到這一點,因爲您需要滾動到右側才能看到它。我試圖在照片和導航欄上播放寬度。同樣的事情也出現在頁腳,它似乎與照片,使我相信它的導航欄延長。我曾嘗試刪除導航欄中的一些內容,但似乎沒有解決問題的方法。如何擺脫右側的空白?
HTML:
<div class="row">
<nav class="navbar navbar-custom" role="navigation">
<div class="navbar-header-xs">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="collapse navbar-collapse" id="collapse">
<ul class="nav navbar-nav">
<li><a href="index.html"><img src= "images/logo.png" /></a></li>
<li><a href="stuff.html">Work</a></li>
<li><a href="stuff.html">About</a></li>
<li><a href="stuff.html">Skills</a></li>
<li><a href="stuff.html">Contact</a></li>
</ul>
</div>
</nav>
</div>
<div class="top">
<img src= "images/picture.png" class="img-responsive" />
</div>
<div id="footer">
<div class="container">
Footer stuff
</div>
</div>
CSS:
body {
padding: 0px;
margin-top: align;
background size: 100%;
-webkit-background-size: cover;
-moz-background-size: cover;
background-size: cover;
-o-background-size: cover;
}
.navbar {
margin-bottom: 0;
max-width: 100%;
}
.navbar-custom {
background-color:#CCE1F4;
border-radius:2px;
font-size: 22px;
}
.navbar-custom .navbar-brand {
color: #2f4f7f;
}
.navbar-custom .navbar-nav > li > a {
color: #2f4f7f;
}
.navbar-custom .navbar-nav > li > a:hover,
.navbar-custom .navbar-nav > li > a:focus {
color: #000000;
background-color: transparent
}
.navbar-custom .navbar-toggle {
border-color: #2f4f7f;
float: left;
margin-left: 40px;
}
.navbar-custom .navbar-toggle:hover,
.navbar-custom .navbar-toggle:focus {
background-color: #2f4f7f;
}
.navbar-custom .navbar-toggle .icon-bar {
background-color: #2f4f7f;
}
.navbar-nav > li{
align: left;
padding-left:15px;
padding-right:25px;
padding-top:5px;
}
.top {
max-width: 100%;
}
@media only screen and (min-width:400px) {
.text-left {font-size:140%;}
}
@media only screen and (min-width:770px) {
.text-left {font-size:170%;}
}
@media only screen and (min-width:400px) {
.intro {font-size:230%;}
}
@media only screen and (min-width:770px) {
.intro {font-size:270%;}
}
#footer {
height: 60px;
background-color: #f5f5f5;
}
.left {
float:left;
align: left;
}
.right {
float:right;
}
能否請您建立一個[的jsfiddle(https://jsfiddle.net/)? – gzc