larin555
larin555

Reputation: 1699

Resizing iFrame depending on DIV size

Here's my code : http://jsfiddle.net/d6j6e/

When you click on the gray little rectangle in the middle, you can drag it to make the DIVs smaller or bigger. A bit like in JSFiddle.

I would like to be able to resize the iframe depending of the DIV size. So If I click and drag the DIV to be bigger, well the iframe size would adjust to the bottom div size.

Any idea?

Thank you!

Upvotes: 0

Views: 150

Answers (1)

Bergi
Bergi

Reputation: 665448

Just remove your absolute values for its size?

#divId
{
 height:480px;
width:640px;    
}

=>

#divId { /* should be "iframeId" */
    height: 100%;
    width: 100%;
}

Upvotes: 1

Related Questions