diff --git a/docs/examples/sticky-footer-navbar/index.html b/docs/examples/sticky-footer-navbar/index.html index 8e449ddba9..dbce0806cd 100644 --- a/docs/examples/sticky-footer-navbar/index.html +++ b/docs/examples/sticky-footer-navbar/index.html @@ -28,53 +28,49 @@
- -Pin a fixed-height footer to the bottom of the viewport in desktop browsers with this custom HTML and CSS. A fixed navbar has been added within #wrap
with padding-top: 60px;
on the .container
.
Back to the default sticky footer minus the navbar.
+Pin a fixed-height footer to the bottom of the viewport in desktop browsers with this custom HTML and CSS. A fixed navbar has been added with padding-top: 60px;
on the body > .container
.
Back to the default sticky footer minus the navbar.
+Place sticky footer content here.
diff --git a/docs/examples/sticky-footer-navbar/sticky-footer-navbar.css b/docs/examples/sticky-footer-navbar/sticky-footer-navbar.css index 553abde08b..76ac2ec89c 100644 --- a/docs/examples/sticky-footer-navbar/sticky-footer-navbar.css +++ b/docs/examples/sticky-footer-navbar/sticky-footer-navbar.css @@ -1,24 +1,18 @@ /* Sticky footer styles -------------------------------------------------- */ - -html, -body { - height: 100%; - /* The html and body elements cannot have any padding or margin. */ -} - -/* Wrapper for page content to push down footer */ -#wrap { - height: auto; +html { + position: relative; min-height: 100%; - /* Pad bottom by footer height */ - padding: 0 0 60px; - /* Negative indent footer by its height */ - margin: 0 auto -60px; } - -/* Set the fixed height of the footer here */ +body { + /* Margin bottom by footer height */ + margin-bottom: 60px; +} #footer { + position: absolute; + bottom: 0; + width: 100%; + /* Set the fixed height of the footer here */ height: 60px; background-color: #f5f5f5; } @@ -28,7 +22,7 @@ body { -------------------------------------------------- */ /* Not required for template or sticky footer method. */ -#wrap > .container { +body > .container { padding: 60px 15px 0; } .container .text-muted { diff --git a/docs/examples/sticky-footer/index.html b/docs/examples/sticky-footer/index.html index 6a58e10d5f..a1d30106f1 100644 --- a/docs/examples/sticky-footer/index.html +++ b/docs/examples/sticky-footer/index.html @@ -28,17 +28,13 @@ - -Pin a fixed-height footer to the bottom of the viewport in desktop browsers with this custom HTML and CSS.
-Use the sticky footer with a fixed navbar if need be, too.
+ +Pin a fixed-height footer to the bottom of the viewport in desktop browsers with this custom HTML and CSS.
+Use the sticky footer with a fixed navbar if need be, too.