There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.
A DIV is a component element of a web page that interacts with other DIV components. An IFRAME is NOT this -- it is a separate PAGE in a PAGE -- think of it like a HOLE cut out in your page, where you see another web page underneath yours. How big do you cut the hole? AHA, that is the problem, it has to be defined.
To test for scalable code, check these -- try them to see if they work --
www.mattcutts.com/blog/iframe-height-scrollbar-example/
http://www.appnitro.com/forums/topic/auto-expandadjustable-iframe
http://w3schools.invisionzone.com/index.php?showtopic=26417