我正在自己的网站上工作,该网站仍然非常非常业余,但遇到了一个我自己无法解决的问题。页脚切断了页脚
我刚刚添加了一个带有内容的边栏(没什么特别的,只是一些填充文本),但是页脚切掉了我的边栏文本,但不是主要内容的文本。
这是我的HTML:
<div id="content">
<div id="main">
<h1>PHP</h1>
</div>
<div id="sidebar">
<h2>Sidebar</h2>
<p>
Hello, this is just some filler tekst. Blablabla blabl blabla blabla blblbla blablalbabla blablalbl.<br>
<br>
As you can see, it's positioned well.
</p>
</div>
</div>
<div id="footer">
<p>Made by me 2014</p>
</div>
,这是我的东西,CSS:
#content {
background : linear-gradient(#669900, #66FF99); /* Gradient - Standaard */
background : -moz-linear-gradient(#669900, #66FF99); /* Gradient - Firefox */
background-repeat : no-repeat;
background-attachment: fixed;
/*margin-left : 185.5px;
margin-right : 185.5px;*/
margin : 0 auto;
width : 980px;
position : relative;
padding : 20px 0 25px 0;
border-left : 5px solid lightgreen;
border-right : 5px solid lightgreen;
}
#main {
padding : 0 30px 0 30px;
margin-right : 200px;
}
#sidebar {
position : absolute;
top : 0;
bottom : 0;
left : 780px;
width : 180px;
float : right;
margin : 0 10px 0 10px;
overflow : auto;
}
#sidebar h2 {
text-align : center;
margin-left : -15px;
}
对不起,我知道这是一个很大阅读,但我希望你能有所帮助。
我的问题是:页脚不会随侧栏中的文本一起移动,而是将其切断,但当主文档中添加了文本时,它会移动。
任何人都可以帮忙吗?
最大
带走'溢出:汽车;' – Albzi
是[>>>它(点击:: JSFiddle)<<<](http://jsfiddle.net/AvBy7/)的效果,你想得到什么? – Benio
@BeatAlex:我已经把它放在那里试图修复它,忘记把它拿走。没有修复它。 :P – MaxForce