Jose Antonio Jose Antonio - 6 months ago 13
CSS Question

Fix divs height HTML and CSS

here I'm another time with another newbie problem :S
I've tried about 2h how to set the Blue background the same height as the white background, but setting "height: 100% or height: 100vh" doesn't work.

https://jsbin.com/sideto/1/edit?html,css,output

Answer

you need to remove padding from this class

div.c1 { height: 100vh; background: #fff; margin-top: -30px; padding: 60px 30px; }

checkout this https://jsbin.com/hekusezobi/1/edit?html,css,output