我完全没有想法......我还不能发布图片,抱歉。所以,我正在创建一个网站,由于某种原因,身体比内容更广泛。我似乎无法找到原因。当我在Chrome Dome中检查它时,它甚至没有被标记为实际的身体。
html {
height:100%;
width:100%;
}
body {
background: black;
margin:0;
padding:0;
position: relative;
height: auto;
min-height: 100% !important;
font-size: 95%;
display:block;
width: 100%;
overflow:auto;
}
.nav {
background: #6192ec;
height: 50px;
width: 100%;
text-align: center;
}
.nav nav{
width: 100%;
line-height: 2.2;
margin: 0 auto;
margin-left: 4%;
vertical-align: top;
display: inline-block;
}
.nav nav a {
font-family: Oxygen;
font-size: 140%;
list-style: none;
color: #283040;
text-decoration: none;
padding: 0 60px 0 0;
}
.nav ul {
position: relative;
display: inline;
padding: 0;
}
.nav nav ul li {
display: inline-block;
}
这是整个代码。如果你能找到任何东西...... 我很感激任何建议,并提前感谢您阅读本文!
答案 0 :(得分:1)
您的导航栏正在推动事情:
.nav nav{
width: 100%; // stretch to entire width
line-height: 2.2;
margin: 0 auto;
margin-left: 4%; // and start 4% away from the edge
vertical-align: top;
display: inline-block;
}
丢失margin-left
,并设置margin: 0;
html {
height:100%;
width:100%;
}
body {
background: black;
margin:0;
padding:0;
position: relative;
height: auto;
min-height: 100% !important;
font-size: 95%;
display:block;
width: 100%;
overflow:auto;
}
a {
text-decoration: none;
}
.container {
background: #fff url("/Users/sophie/Dropbox/Projects/TeneriffaBlog/imgsrc/pattern-9xhd.png") repeat;
min-height:100%;
position:relative;
}
.header {
background: #3b3c3f;
height: 80px;
}
.header img {
height: 60px;
width: auto;
float: left;
padding-left: 50px;
padding-top: 10px;
}
.header h1 {
float: left;
margin: 0 1%;
}
.header a, a:active, a:visited {
font-family: Vollkorn;
font-weight: normal;
letter-spacing: 1px;
line-height: 2.4;
font-size: 110%;
color: #e6e6e6;
}
.nav {
background: #6192ec;
height: 50px;
width: 100%;
text-align: center;
}
.nav nav{
width: 100%;
line-height: 2.2;
margin: 0;
vertical-align: top;
display: inline-block;
}
.nav nav a {
font-family: Oxygen;
font-size: 140%;
list-style: none;
color: #283040;
text-decoration: none;
padding: 0 60px 0 0;
}
.nav ul {
position: relative;
display: inline;
padding: 0;
}
.nav nav ul li {
display: inline-block;
}
.nav ul li .activeArrow {
width: 0px;
height: 0px;
border-left: 10px solid transparent;
border-right: 10px solid transparent;
border-bottom: 10px solid #f7f7f7;
margin: -8px 0 0 20px;
}
.searchbar {
float: right;
margin: 0 2%;
line-height: 5.5;
}
.searchbar input {
font-family: Arial,sans-serif;
color: #909cb2;
font-size: 110%;
font-style: italic;
border: 1px solid #6192ec;
border-radius: 3px;
background-color: #fff;
height: 30px;
width: 300px;
padding: 3px;
}
.searchbar input.sBtn {
height: 38px;
width: 75px;
}
.impressum {
color: #8c8686;
font-family: 'Lato',arial,sans-serif;
font-size: 12px;
text-align: left;
height: 80px;
width: auto;
line-height: 80px;
float: left;
padding-left: 19%;
}
.credit {
color: #8c8686;
font-family: 'Lato',arial,sans-serif;
font-size: 12px;
text-align: left;
height: 80px;
width: auto;
line-height: 80px;
float: right;
padding-right: 20%;
}
.impressum ul, li {
text-decoration: none;
list-style: none;
display: inline;
padding: 0 6px;
}
.impressum a {
color: #8c8686;
font-family: 'Lato',arial,sans-serif;
font-size: 12px;
}
.content {
background: none;
width: 100%;
height: 100%;
overflow: auto;
display: block;
padding-bottom: 80px; /* Height of the footer element */
}
.content {
color: 661128;
font-family: 'Lato', arial, sans-serif;
text-align: center;
}
.welcome {
float: right;
width: 57%;
}
.hikeList {
position: relative;
background: #eff1f8 url("/Users/sophie/Dropbox/Projects/TeneriffaBlog/imgsrc/bg.png");
border-right: 1px solid #a0b6c9;
float: left;
width: 24.9%;
min-height: 100%;
height: 100%;
}
.hikeList ul {
overflow: scroll;
}
.hikeList ul li {
display: list-item;
}
.footer {
width:100%;
height:80px;
position:absolute;
bottom:0;
left:0;
background: #3b3c3f;
}

<div class="container">
<div class="header">
<img src="/Users/sophie/Dropbox/Projects/TeneriffaBlog/imgsrc/favicon.png" alt="icon">
<h1><a href="#">ABC <i>DEF</i> HIJ <i>KLM</i></a></h1>
<article class="searchbar">
<form id="tfnewsearch" method="get" action="http://www.google.com">
<input type="text" id="tfq2b" class="tftextinput2" name="q" size="21" maxlength="120" value="Suchen Sie auf unserer Website">
<input type="submit" value="Suchen" class="sBtn">
</form>
</article>
</div>
<div class="nav">
<nav>
<ul>
<li>
<a href="#">Home</a>
<div class="activeArrow"></div>
</li>
<li><a href="#">Grundregeln</a></li>
<li><a href="#">Wanderungen</a></li>
<li><a href="#">Links</a></li>
</ul>
</nav>
</div>
<div class="content">
<div class="hikeList">
<ul>
<li><a href="">Item 1</a></li>
<li><a href="">Item 2</a></li>
<li><a href="">Item 3</a></li>
<li><a href="">Item 4</a></li>
<li><a href="">Item 5</a></li>
<li><a href="">Item 6</a></li>
<li><a href="">Item 7</a></li>
<li><a href="">Item 8</a></li>
<li><a href="">Item 9</a></li>
<li><a href="">Item 10</a></li>
<li><a href="">Item 11</a></li>
<li><a href="">Item 12</a></li>
<li><a href="">Item 13</a></li>
<li><a href="">Item 14</a></li>
<li><a href="">Item 15</a></li>
<li><a href="">Item 16</a></li>
<li><a href="">Item 17</a></li>
<li><a href="">Item 18</a></li>
<li><a href="">Item 19</a></li>
<li><a href="">Item 20</a></li>
<li><a href="">Item 21</a></li>
<li><a href="">Item 22</a></li>
<li><a href="">Item 23</a></li>
<li><a href="">Item 24</a></li>
<li><a href="">Item 25</a></li>
<li><a href="">Item 26</a></li>
<li><a href="">Item 27</a></li>
<li><a href="">Item 28</a></li>
<li><a href="">Item 29</a></li>
<li><a href="">Item 30</a></li>
<li><a href="">Item 31</a></li>
<li><a href="">Item 32</a></li>
<li><a href="">Item 33</a></li>
<li><a href="">Item 34</a></li>
<li><a href="">Item 35</a></li>
<li><a href="">Item 36</a></li>
<li><a href="">Item 37</a></li>
<li><a href="">Item 38</a></li>
<li><a href="">Item 39</a></li>
<li><a href="">Item 40</a></li>
<li><a href="">Item 41</a></li>
<li><a href="">Item 42</a></li>
<li><a href="">Item 43</a></li>
<li><a href="">Item 44</a></li>
<li><a href="">Item 45</a></li>
<li><a href="">Item 46</a></li>
<li><a href="">Item 47</a></li>
<li><a href="">Item 48</a></li>
<li><a href="">Item 49</a></li>
<li><a href="">Item 50</a></li>
</ul>
</div>
<div class="welcome">
<div class="headImg">
</div>
<h2>Welcome</h2>
<article>
welcome text
</article>
</div>
</div>
</div>
<div class="footer">
<div class="impressum">
<li>
<ul><a href="#">About</a></ul>
<ul>|</ul>
<ul><a href="#">Contact</a></ul>
<ul>|</ul>
<ul><a href="">Impressum</a></ul>
</li>
</div>
<div class="credit">
Blup
</div>
</div>
</div>
&#13;