Modern Clean CSS “Sticky Footer” from James Dean
HTML
<!DOCTYPE html>
<head>
<title></title>
</head>
<body>
<nav></nav>
<article>Lorem ipsum...</article>
<footer></footer>
</body>
</html>
CSS
html {
position: relative;
min-height: 100%;
}
body {
margin: 0 0 100px; /* bottom = footer height */
}
footer {
position: absolute;
left: 0;
bottom: 0;
height: 100px;
width: 100%;
}
Demo here
Related Contents:
- Why position:sticky is not working when the element is wrapped inside another one?
- How does the “position: sticky;” property work?
- Why is ‘position: sticky’ not working with Core UI’s Bootstrap CSS
- Fix footer to bottom of page
- ‘position: sticky’ not working when ‘height’ is defined
- Is there a way to get a web page header/footer printed on every page?
- Make a nav bar stick
- How to align footer (div) to the bottom of the page? [duplicate]
- Why not use tables for layout in HTML? [closed]
- How do you get the footer to stay at the bottom of a Web page?
- How to overlay one div over another div
- How to hide a text and make it accessible by screen reader?
- Element will not stay centered, especially when re-sizing screen
- Can I set an opacity only to the background image of a div?
- Table fixed header and scrollable body
- How to make CSS3 rounded corners hide overflow in Chrome/Opera
- Resize image proportionally with CSS? [duplicate]
- display: inline-block extra margin [duplicate]
- Minimum and maximum value of z-index?
- CSS content generation before or after ‘input’ elements [duplicate]
- Why do absolute elements stack up on each other instead of stacking one after the other?
- Matching the first/nth element of a certain type in the entire document
- Making a div vertically scrollable using CSS
- Using flex order property to re-arrange items for desktop and mobile views
- How to add 1px margin to a flex item that is flex: 0 0 25%?
- Removing whitespace between HTML elements when using line breaks
- Media Queries for Different zoom Levels of Browser
- Apply style to parent if it has child with CSS [duplicate]
- CSS background-size: cover replacement for Mobile Safari
- Empty vertical space between columns in Bootstrap 4
- bootstrap 3 to bootstrap 4 cols no longer horizontally aligned [duplicate]
- Bootstrap navbar: nothing is displayed on smaller devices
- How to change the style of the title attribute inside an anchor tag?
- Turn off iPhone/Safari input element rounding
- Style input element to fill remaining width of its container
- Remove border from IFrame
- DISABLE the Horizontal Scroll [closed]
- Link a .css file in another folder
- How to make in CSS an overlay over an image?
- Add a pipe separator after items in an unordered list unless that item is the last on a line
- add title attribute from css
- Center form submit buttons HTML / CSS
- CSS3 border-radius clipping issues
- Targeting text nodes with CSS
- Inverted Scooped corners using CSS
- How do I make flex box work in safari?
- Flexbox, z-index & position: static: Why isn’t it working?
- How can I increase a scrollbar’s width using CSS?
- Change color of bootstrap navbar on hover link?
- Missalignment with inline-block (other elements pushed down)