html - Height in percentage does not apply -


I want to understand that why my case, Height: x% does not apply. Div / section with percent always gets height: 0

  My code: http://codepen.io/anon/pen/aHhmD  < / pre> 

to apply the height in percent of an element, should apply to the height of its ancestors. In your section Only one minute-height is applied instead give it a height:

  html, body {padding: 0; Margin: 0; Height: 100%}. Partial {condition: relative; Display area; Minimum width: 100%; Height: 100%; Background color: # 008000; }. U. Status: Relative; Display area; Background color: navy; Minimum width: 100%; Minimum height: 50%; } .do {status: relative; Display area; Background color: orange; Minimum width: 100%; Minimum height: 50%; }  

Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -