javascript - How to automatic make-up the divs in parent div -


i have parent div , child divs different width , height. how can float parent div child's max effective without loss space absolute positioned elements.

the example:

http://jsfiddle.net/ksbjt

what kind of direction need dig?

html

<div class="parent" style="width: 500px; height: 500px; border: 1px solid #000; background: red; position: relative;">     <div style="width: 100px; height: 200px; border: 1px solid #000; background: blue;"></div>       <div style="width: 200px; height: 500px; border: 1px solid #000; background: green;"></div>      <div style="width: 100px; height: 200px; border: 1px solid #000; background: yellow;"></div>     <div style="width: 100px; height: 200px; border: 1px solid #000; background: aqua; position: absolute; top: 200px"></div> </div> 

css

.parent div {     float: left; } 

i don't understand you're asking think might need change absolute positioned divs relatively positioned if move parent, relatives move relative it.


Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -