solved-by-flexbox icon indicating copy to clipboard operation
solved-by-flexbox copied to clipboard

Sticky footer example doesn't mention html height 100%

Open kylegordy opened this issue 7 years ago • 6 comments

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 🙌

kylegordy avatar Mar 22 '18 00:03 kylegordy

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

JackCrompton avatar Mar 27 '18 10:03 JackCrompton

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

kylegordy avatar Mar 27 '18 18:03 kylegordy

Also in page in section The CSS You have CSS:

  min-height: 100vh;

But in source you use

  height: 100%;

mrFleshka avatar Mar 31 '18 01:03 mrFleshka

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

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

arechsteiner avatar Apr 24 '18 14:04 arechsteiner

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

philipwalton avatar Apr 26 '18 00:04 philipwalton

@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).

mrFleshka avatar Apr 26 '18 07:04 mrFleshka