Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Constant Footer Size & Positioning #8

Open
mahendra785 opened this issue Aug 20, 2024 · 1 comment
Open

Constant Footer Size & Positioning #8

mahendra785 opened this issue Aug 20, 2024 · 1 comment

Comments

@mahendra785
Copy link
Collaborator

Ensure that the footer has a constant size across all pages and is always positioned at the bottom of the page, even when the content is shorter than the screen height.

@mahendra785
Copy link
Collaborator Author

Constant Footer Size & Positioning

Pseudocode

1. Footer Component Structure

  • Footer Component
    • div.footer
      • Footer content (e.g., copyright, links, social media icons)
      • Ensure the height is fixed.

2. Layout Container

  • Main Layout Container
    • div.wrapper
      • header - Navbar or header component
      • main.content
        • Dynamic page content
      • footer - Footer component (constant height)

3. CSS for Constant Footer Size & Positioning

  • Set wrapper to fill the screen:
    • Use display: flex; flex-direction: column; on wrapper.
    • Ensure main.content grows to fill the remaining space.
    • Footer should always sit at the bottom.

4. Handle Pages with Short Content

  • Ensure main.content stretches to push the footer down:
    • Use flex-grow: 1; on main.content.
    • Footer should not move even if content is short.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant