How to create a div with height in percentage?

0

Good, people! I have a doubt. When I create a div / footer / header and I go in css to edit its dimensions I can quietly put width 100%, but height can not edit with percentage, just with px, could you give me a hint how to do this? In case I should put the body with 100% height so others have a dimension of how many% occupy? I avoid putting px because I believe that the site is not responsive without it, however if I have any tips I thank. Thank you in advance!

    
asked by anonymous 27.02.2017 / 10:22

1 answer

0

Set 100% to html and min-height to body .

html {
    height: 100%;
}

body {
  min-height: 100%;
}
    
27.02.2017 / 11:13