Getting the larger of two divs floated side-by-side to extend its border?

Use jQuery add this in head and put this snippet in head or body.

If that's what you mean, you can specify the height to be 100% in the css for the larger div.

One way to achieve this effect is via absolute positioning. In this method, the width of your container is known (like 1024px for example) and you divide the available space between your two divs, 324px for the your div2 and 700px for div1. This way, you don't have to float divs. All you have to do is to define position: relative; for the container, and position: absolute; for two divs. Then you have to specify top: 0; right: 324px; bottom: 0; left: 0; for your div1.

Another method is the floating that you've used here. By floating, you should float your both divs to the left or right, and specify width for each of them. Then you should not worry about the height of the width, because the div1 would be extended based on its contents.

If you mean that div one is higher then div 2 and you want them to be the same height then this is the script for you. Function setHeight(id1, id2){ //haal de elementen op en plaats deze in een lokale variabel var elem1 = document. GetElementById(id1); var elem2 = document.

GetElementById(id2); // controleer of de offsetHeight van element1 of 2 groter is // dan de ander en pas de kleinste aan if(elem1. OffsetHeight>elem2. OffsetHeight){ elem2.style.

Height = elem1. OffsetHeight+'px'; }else{ elem1.style. Height = elem2.

OffsetHeight+'px'; } } put this in a javascript file or in the head of your html inside de script tags ofcourse and put the following code inside your body tag onload="setHeight(id1, id2)" now you just need to give the div's you want to resize the id1 and 2(can be any name, as long as its is there in the parameters) and it works :) good luck, and let me know if you have isues. I use this myself so it works :).

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