This is precisely what position: fixed
was designed for:
#footer {
position: fixed;
bottom: 0;
width: 100%;
}
Here’s the fiddle: http://jsfiddle.net/uw8f9/
More Related Contents:
- Difference between static and relative positioning
- CSS positioning things differently between browsers [closed]
- Why can’t an element with a z-index value cover its child?
- How to Create Grid/Tile View? [duplicate]
- How can I center an absolutely positioned element in a div?
- Why bottom:0 doesn’t work with position:sticky?
- Understanding z-index stacking order
- CSS transition effect makes image blurry / moves image 1px, in Chrome?
- Footer at bottom of page or content, whichever is lower
- Center a position:fixed element
- My position: sticky element isn’t sticky when using flexbox
- Why does `overflow:hidden` prevent `position:sticky` from working?
- Flushing footer to bottom of the page, twitter bootstrap
- If you specify `bottom: 0` for position: sticky, why is it doing something different from the specs?
- What are the default top, left, botton or right values when position:absolute is used?
- Z-Index Relative or Absolute?
- How do I center an SVG in a div?
- Set Google Maps Container DIV width and height 100%
- position: absolute without setting top/left/bottom/right?
- CSS: fixed to bottom and centered
- IE7 relative/absolute positioning bug with dynamically modified page content
- pure CSS multiple stacked position sticky?
- Problem with CSS Sticky Footer implementation
- Absolute positioning ignoring padding of parent
- Sizing and positioning elements based on window width
- position relative in firefox [duplicate]
- Have a fixed position div that needs to scroll if content overflows
- How to horizontally center a floating element of a variable width?
- How to use CSS position sticky to keep a sidebar visible with Bootstrap 4
- Why magin:auto is not enough to center position absolute or fixed?