我不能爲我的生活弄清楚這一點。我試圖使用div來給我的頁面的內容半透明的背景。問題是div只能在內容上下降。不管內容如何,我都希望不透明的背景一直貫穿到頁腳。我所指的頁面位於此處。 www.codykrauskopf.com/circus(這是我上傳的唯一頁面)我正在修改網站以響應瀏覽器大小,因此不允許修復任何寬度或高度。Div不會繼承父元素的高度
CSS:
html, body {
height: 100vh;
margin:0;
padding:0;
overflow:auto;
}
#circusContent {
margin-left:100px;
height:100%;
}
p {
font-family:georgia;
}
div.topButtons {
display:inline-block;
margin-top:15px;
line-height:50px;
text-align:center;
vertical-align:middle;
width:130px;
background: rgb(166, 166, 166); /* The Fallback */
background: rgba(166, 166, 166, .5);
}
#leftTopButton {
margin-left:75px;
}
a.forms {
text-decoration:underline;
}
div.topButtons:hover {
background: rgb(100, 0, 0); /* The Fallback */
background: rgba(0, 0, 0, 1);
}
#circusParagraph{
color:white;
font-size:14px;
text-align:center;
margin-left:125px;
margin-top:25px;
}
#wrap {min-height: 100vh;
width:99.99999999999%;}
打開調試器的東西像鉻,檢查元素,看看有什麼重寫它。 – MightySchmoePong
我沒有看到#wrap div的CSS。這是下到你的頁腳的div。 – bart2puck
我一定是在事故中遺漏了它,但它絕對是在文件中。 #wrap {min-height:100vh; width:99.99999999999%;} 我試圖刪除其他頁面上使用的多餘東西。 –