The script below attempts to fix that by dynamically resizing the iframe to fit the content it loads. If the content inside is bigger, scrollbars have to suffice. Set the width and height to 100 and absolutely position it to the top left. Add a container for the iframe, determine the aspect ratio percentage, hide the overflow, and set its position to relative. am using jquery 1.9. Resize Iframe to Fit Content (Same Domain Only) Chris Coyier on (Updated on ) Normally you set and width and height for iframes. The 3 steps to create a responsive iframe that keeps its aspect ratio: Create the aspect ratio box. (Dynamically Loaded data from DB.) function loadgrid() Based on Combo value the gridview row has been binded. For your convenience, there is a built in support for inline content and ajax. This is My Parent Page: I Have two Iframe with different page with dynamic Content. fancybox is designed to display images, video, iframes and any HTML content. I left Google Analytics code off the demo above, as when I added it in it seems to interfere and not resize the iframe, despite seemingly generating no errors.if the content inside the iframe changes height, this won’t adapt.Then place a semicolon (' ') after the attribute. The source of the iframe content must reside on the same domain Enter the width of the iframe in pixels after the 'width:' attribute in the list of attributes below the iframe element.Normally you set and width and height for iframes.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |