Css anchor div to foot page

I can quickly bounce off the wall, I cannot believe that something is so stupid that it completely defeated me ... so I am turning to you, Stack Overflow ... for guidance and enlightenment.


Problem: Sit the div at the foot of the page, 100% wide, outside any wrapper.
Suggested Solution: http://ryanfait.com/sticky-footer/

Implementation with content: http://www.weleasewodewick.com/redesign/index_content.html Implementation without content: http://www.weleasewodewick.com/redesign/index.html

with content → Good, it works beautifully
no content = bad, the footer sits exactly the height of the footer under the viewport.


I really would appreciate your contribution to this, it completely annoyed me over the past hour. I fully expect some form of ridicule :)


Clarification: The footer should be attached to the bottom of the viewport if there is not enough content to fill the page. It should fall below the bottom of the viewport if there is enough content.

Thank!
Drunk

+3
source share
2 answers
+5
source

, , ?

:

#footer {
   width: 100%;
   height: 150px;  
   position: fixed; 
   bottom: 0px; 
   left: 0px; 
}

, , position absolute.

+2

Source: https://habr.com/ru/post/1750599/


All Articles