What is the essential difference between:
position: absolute;
top: 0;
height: 100%;
and
position: absolute;
top: 0;
bottom: 0;
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The height of the child element is determined differently for each property:
bottom: 0=>child_height = parent_height – child_margin – child_border
height: 100%=>child_height = parent_height
In other words
height: 100%sets the inner height of the child to the same height of its parent, whilebottom: 0sets the outer height of the child to the same height of its parent.Example from https://jsfiddle.net/2N4QJ/1/
More info about position/dimension:
http://msdn.microsoft.com/en-us/library/ms530302(VS.85).aspx (archive link)