me and a friend are working on a html app for smartphone (part of an internship).
Im trying to get a webpage to display in a seperate div. I can get this done easily enough with an iframe but the problem is the divs width can be expanded.
What would be the simplest way to get a webpage in a div that resizes to fit the dimensions of the div it is in?
My mate is doing all the javascript and is using jquery and I am focusing on the html and css work. I have very little experience with js.
You can use CSS or
widthandheightattributes of an<iframe>to match its width with thedivit is placed in. But whether the webpage resizes exactly to fit in thedivso that you don’t get horizontal scrollbars depend upon the webpage itself. It will fit if thedivis big enough for the webpage or if the webpage has a fluid layout i.e. the width of its contents is defined in%.