I have a website whose layout has been shown in the diagram. The body consists of a main container
, which comprises of header
, parent div
and footer
. The parent div
further contains several child div
as shown.
The problem being height of all the child div
is finite. But the parent div
contains nothing other than the child divs. All the child divs are visible but the height of the parent div is shown to be zero. I am also not fixing the height of the parent div by giving some pre-specified value as it may cause blunder if number of child increases in future.
The problem due to zero size of parent div is that my footer div is going up and clashing with the contents of the parent div. This can be resolved by giving a suitable margin-top, but that is not a solution I am looking for.
Can anyone suggest me some way so that the height of the parent div changes automatically according to the height of child divs present.
Please comment if I am unclear in asking my doubt !
float: etc
? – Hallelujah