ram4nd Posted January 16, 2010 Share Posted January 16, 2010 I have code: <div><div>Header div</div><iframe src="google.com"></iframe></div> Header is 100px height and iframe is 100%. The problem is that the first div is 100% + 100px height. I need to make it just 100%. Quote Link to comment https://forums.phpfreaks.com/topic/188673-iframe-and-divs/ Share on other sites More sharing options...
haku Posted January 18, 2010 Share Posted January 18, 2010 Unfortunately, CSS doesn't allow for calculated values. Quote Link to comment https://forums.phpfreaks.com/topic/188673-iframe-and-divs/#findComment-996923 Share on other sites More sharing options...
ram4nd Posted January 18, 2010 Author Share Posted January 18, 2010 hmm so I should do the header 10% and the content iframe 90% height? Is that the only option? Quote Link to comment https://forums.phpfreaks.com/topic/188673-iframe-and-divs/#findComment-997210 Share on other sites More sharing options...
otuatail Posted January 18, 2010 Share Posted January 18, 2010 Not much code to go on here have you got * { padding: 0; margin: 0; } in the style sheet Desmond. Quote Link to comment https://forums.phpfreaks.com/topic/188673-iframe-and-divs/#findComment-997528 Share on other sites More sharing options...
haku Posted January 19, 2010 Share Posted January 19, 2010 hmm so I should do the header 10% and the content iframe 90% height? Is that the only option? I'm not sure to tell the truth. That would be one method, but have you tried setting the height of the iframe to 100%, and not setting the height of the header? That may possibly work. I'm not sure if the iframe will go to 100% of the container's height, or 100% of the available space. I kind of think it won't work to tell the truth, but its worth a try. Quote Link to comment https://forums.phpfreaks.com/topic/188673-iframe-and-divs/#findComment-997781 Share on other sites More sharing options...
ram4nd Posted January 19, 2010 Author Share Posted January 19, 2010 owned it with javascript Quote Link to comment https://forums.phpfreaks.com/topic/188673-iframe-and-divs/#findComment-997973 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.