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

Footer covering tags on smaller screens #19

Open
NoisyWool opened this issue Oct 30, 2019 · 0 comments
Open

Footer covering tags on smaller screens #19

NoisyWool opened this issue Oct 30, 2019 · 0 comments

Comments

@NoisyWool
Copy link
Contributor

The problem

On displays with a width less than 992 pixels the footer overlaps the "Top Ten tags" section:

Footer covering "Top Ten tags"

Semitransparent footer covering "Top Ten tags"

Tested solutions

Increase margin-bottom

Increase the margin-bottom property on body to 120px.

Pros

  • No major changes to the html or the css.

Cons

  • Every time content is added to or removed from the footer margin-bottom needs updated.
  • 120 pixels was gotten empirically.

Use flexbox

Add this to main.css:

body {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

#content {
    flex: 1;
}

.footer {
    flex-shrink: 0;
    background-color: #f5f5f5;
}

then add the id="content" attribute to base.html:

<div id="content" class="container">
...
</div>
<footer class="footer">
...
</footer>

Pros

  • No need to update when the footer changes.

Cons

  • Not supported by older browsers: Can I use
  • Requires a minor change to the html.
  • Requires a major change to the css.

Feedback wanted

Any feedback on which solution to use or other possible solutions is appreciated.

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