簡體   English   中英

將浮動元素與div的底部對齊

[英]Aligning floating elements to bottom of div

嘗試向左浮動一個ul和向右浮動一個ul,並將其保持在div的底部,但未成功

小提琴這是小提琴http://jsfiddle.net/Ku2jk/

將容器浮動到另一個容器中的方法沒有問題,該容器位於絕對底部。

您只是遇到了一些語法錯誤,加上保存浮動div的容器沒有寬度。

http://jsfiddle.net/Ku2jk/26/

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-colorbackground

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM