100% height on an iframe/div

I'd like an iframe (which is inside a div) to take up all the available space, vertically, in the browser window. Here's the HTML:

<div id="detail">
      <iframe width="100%" height="100%" src="images/bigpic.jpg"></iframe>
</div> <!-- detail -->


All applicable CSS that's being applied is below:

#detail {
background-color: #f0f0f0;
clear: both;
}

#detail iframe {
margin: 15px;
width: 95%;
clear: both;
height: 100%;
}


I'm not sure if this is possible? I'm happy to use Javascript if that's what's required. Thanks in advance!
saltedAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

saltedAuthor Commented:
I have just realised that the contents of the iframe (an image) could just as easily be in a div with overflow:scroll, so the iframe could be removed altogether. If that's easier, then I just need an answer for how to get a div to take up as much of the browser's height as is available.
0
noamattdCommented:
You need to set the div's containing element , and it's parent element(s) to have 100% height as well, including the html and body elements.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
saltedAuthor Commented:
Thanks for the response. I actually tried that and it didn't work for me (I saw that answer after a Google search).
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
CSS

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.