[英]Aligning floating elements to bottom of div
將容器浮動到另一個容器中的方法沒有問題,該容器位於絕對底部。
您只是遇到了一些語法錯誤,加上保存浮動div的容器沒有寬度。
height = 100px;
^ should be height:100px;
backgroundcolor: blue;
^ should be background-color;
#menubar{
position: absolute;
bottom: 0;
width: 100%;
^ needed a width because positioned absolute.
}
哪個div? 嘗試刪除position: absolute
#menubar
position: absolute
。 另外,將backgroundcolor
更改為background-color
或background
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.