Skip to content
GitLab
    • Explore Projects Groups Snippets
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bootstrap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 263
    • Issues 263
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 114
    • Merge requests 114
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Bootstrap
  • bootstrap
  • Merge requests
  • !7769

Use padding instead of #push with box-sizing: border-box

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/holic/3.0.0-sticky-footer into 3.0.0-wip 12 years ago
  • Overview 0
  • Commits 1
  • Pipelines 0
  • Changes 2

Created by: holic

Now that we're using box-sizing: border-box throughout, the sticky footer examples no longer require the additional #push markup and can be replaced by padding on the #wrapper.

Compare
  • 3.0.0-wip (base)

and
  • latest version
    07117f97
    1 commit, 2 years ago

2 files
+ 4
- 10

    Preferences

    File browser
    Compare changes
docs/e‎xamples‎
sticky-foote‎r-navbar.html‎ +2 -5
sticky-fo‎oter.html‎ +2 -5
docs/examples/sticky-footer-navbar.html
+ 2
- 5
  • View file @ 07117f97

  • Edit in single-file editor

  • Open in Web IDE


@@ -22,14 +22,13 @@ title: Sticky footer with navbar template
height: 100%;
/* Negative indent footer by its height */
margin: 0 auto -60px;
/* Pad bottom by footer height */
padding: 0 0 60px;
}
/* Set the fixed height of the footer here */
#push,
#footer {
height: 60px;
}
#footer {
background-color: #f5f5f5;
}
@@ -106,8 +105,6 @@ title: Sticky footer with navbar template
<p class="lead">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 <code>#wrap</code> with <code>padding-top: 60px;</code> on the <code>.container</code>.</p>
<p>Back to <a href="../sticky-footer">the default sticky footer</a> minus the navbar.</p>
</div>
<div id="push"></div>
</div>
<div id="footer">
docs/examples/sticky-footer.html
+ 2
- 5
  • View file @ 07117f97

  • Edit in single-file editor

  • Open in Web IDE


@@ -22,14 +22,13 @@ title: Sticky footer template
height: 100%;
/* Negative indent footer by its height */
margin: 0 auto -60px;
/* Pad bottom by footer height */
padding: 0 0 60px;
}
/* Set the fixed height of the footer here */
#push,
#footer {
height: 60px;
}
#footer {
background-color: #f5f5f5;
}
@@ -71,8 +70,6 @@ title: Sticky footer template
<p class="lead">Pin a fixed-height footer to the bottom of the viewport in desktop browsers with this custom HTML and CSS.</p>
<p>Use <a href="../sticky-footer-navbar">the sticky footer with a fixed navbar</a> if need be, too.</p>
</div>
<div id="push"></div>
</div>
<div id="footer">
0 Assignees
None
Assign to
0 Reviewers
None
Request review from
Labels
0
None
0
None
    Assign labels
  • Manage project labels

Milestone
v3.0.1
v3.0.1
None
Time tracking
No estimate or time spent
Lock merge request
Unlocked
0
0 participants
Reference: twbs/bootstrap!10996
Source branch: github/fork/holic/3.0.0-sticky-footer

Menu

Explore Projects Groups Snippets