When iFrames have scrollbars, it really doesn't look good and user experience is spoiled too. So, it would have been better if iFrames adjusted themselves according to the content they have in them. JavaScript has the solution.
Now, the iFrame,
That's all.
<script language="javascript" type="text/javascript"> function resize(obj) { obj.style.height = obj.contentWindow.document.body.scrollHeight + 'px'; } </script>
Now, the iFrame,
<iframe src="http://www.mp3jack.in/" frameborder="0" scrolling="no" id="iframe" onload='javascript:resize(this);' />
That's all.
0 comments