My parent div has a min-height of 100%. An inner div with a position absolute has a min-height of 100%. When more content is added to the inner height, the parent height does not change?
-
-
Answer:
Element positioned with absolute is taken out of the normal flow, that's why it won't change it's parent's height.
Yujun Wu at Quora Visit the source
Other answers
The child element is no longer relative to the parent element since it is no longer part of the document flow. When you declare absolute positioning for an element, this is what happens. The element in question is removed from the document flow, or the structure of the html, even though the DOM itself remains unaltered. It becomes relative to the window if no parent element higher up in the document model has been explicitly declared as relative.It's as though the child element has been removed from the parent element, leaving it empty. When the height or width of the child element increases, it doesn't affect the height or width of the parent element, and the flow of preceding and following elements remains unchanged.The child element becomes a ghost that can pass through the box model of the parent element, without affecting its proportions. You can constrain the absolute positioned child by explicitly declaring relative positioning to a parent element - this way, the absolute positioned child won't pass the parent element's dimensions, this is particularly useful for aligning elements declared with absolute positioning.
Nathan George Jean Shepherd
Related Q & A:
- How to target the parent div from child div?Best solution by Stack Overflow
- When I Turn a song in my car stereo i got a sony xplod stereo and when flip threw songs it thump in my subs?Best solution by Yahoo! Answers
- How do you replace a Crankshaft position sensor on a 2003 Saab 9-3?Best solution by Yahoo! Answers
- How long will it take to be hired for a position?Best solution by teachers.net
- Where to find a good pair of over ear headphones under $100?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.