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

Sticky footer example doesn't mention html height 100% #113

Open
kylegordy opened this issue Mar 22, 2018 · 6 comments
Open

Sticky footer example doesn't mention html height 100% #113

kylegordy opened this issue Mar 22, 2018 · 6 comments

Comments

@kylegordy
Copy link

Not really a bug, but you might want to mention in your Sticky Footer Example that you also have to set the height of the HTML element to 100% (like you do here) in order for this to work. That detail was tripping me up for second.

Anyways, love the site! Thanks to everyone who put it together 🙌

@JackCrompton
Copy link

Just adding to this, the height of the body element must also be 100%

@kylegordy
Copy link
Author

kylegordy commented Mar 27, 2018

Hmm, that wasn't the case on my project. html {height: 100%;} did the trick just fine 🤔

@mrFleshka
Copy link

mrFleshka commented Mar 31, 2018

Also in page in section The CSS
You have CSS:

  min-height: 100vh;

But in source you use

  height: 100%;

@arechsteiner
Copy link

arechsteiner commented Apr 24, 2018

you also have to set the height of the HTML element to 100%

Thanks @kylegordy, I thought I was losing my mind.

@philipwalton
Copy link
Owner

@mrFleshka you can read this article for some context on the difference:
https://philipwalton.com/articles/normalizing-cross-browser-flexbox-bugs/

@mrFleshka
Copy link

@philipwalton and there is nothing about vh vs %
I understand height/min-height, but i dont understand why you show in code snippet one version and use another (and show how it really work, like example).

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

5 participants