簡體   English   中英

HTML-在頁腳上對齊圖像

[英]HTML - aligning image on the footer

嘗試將圖像與頁面底部對齊時遇到麻煩。 我正在編輯我的worpdress php文件:用於HTML的footer.php和用於CSS的stylesheet.css。 當我更改底部居民或包裝紙的高度時,它不會更改圖像的位置。 如何更改html / css,使其位於頁面底部的某個位置?

的HTML

 <div id="wrapper">
         <div id="bottomDweller">
         <img src="http://anbhialann.ie/wp-content/uploads/2014/01/Menu-Pages-Badge.png" alt="Bottom of the page" width="42" height="42"></div>
    </div>

的CSS

#wrapper {height: 500px; position:relative;}
#bottomDweller {position: absolute; bottom:20px;}

像這樣

remove #bottomDweller下面的bottom:20px

演示

的CSS

#bottomDweller {
    position: absolute;
    bottom: 0;
    background-color:red;
}

暫無
暫無

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

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