Css vertical height with position: absolute?

You have a couple options in this situation.

You have a couple options in this situation. The first is to use { position: relative } instead of absolute. This keeps the elements in the flow of the page and the parent will render with the size you're looking for.

The other option is to use a bit of javascript to find the size of each child, determine which is largest, and then set the parent to that height. Var children = document. GetElementById('content').

GetElementsByTagName('div'); var max_child_height = 0; for(i = 0; I max_child_height) { max_child_height = childreni. OffsetHeight; } } document. GetElementById('parent').

Height = max_child_height.

You can use javascript for solving this problem. Or position:relative plugins.jquery.com/project/Tallest It might be useful.

I assume the child-N element are positioned side by side. While you do this using absolute positioning you could also do this using float:left. This way (after clearing) the parent will have the height of the highest child element.

#child-1, #child-2, #child3 { width: 200px; float: left; } /* now clear the float, otherwise #content would have no height*/ #content { overflow:hidden;/*normal browsers*/ zoom:1;/*IE fix*/ }.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions