Php photo gallery TWG | JFUploader | TWG Flash upload | WFU | Forum
https://www.tinywebgallery.com/forum/

Adjust Height Ratio with Screen Size Changes
https://www.tinywebgallery.com/forum/viewtopic.php?f=21&t=4566
Page 1 of 1

Author:  Elkerton [ 10. Mar 2018, 19:02 ]
Post subject:  Adjust Height Ratio with Screen Size Changes

Greetings. Setting the Advanced iframe height to a ratio works very well in my instance: http://thehvacsource.com. I would like to update the height ratio based on screen size and have no control over the framed site. I used media queries to accomplish this goal and they worked perfectly in Chrome. However, IE11 and Firefox did not recognize the media queries. Is there a more direct way to accomplish this goal (other than CSS), or a way to make IE11 and Firefox recognize the media queries? Below is the media query that works in Chrome, allowing a little more height as the screen width is reduced (and you can test):

Code:
@media only screen and (max-width: 1080px) { /* below 1080px */
    #ai-div-hvac2 {
     height:1320px !important;
   }
    #hvac2 {
     height:1410px !important;
   } 
}


Thank you.

Author:  TinyWebGallery [ 17. Mar 2018, 18:48 ]
Post subject:  Re: Adjust Height Ratio with Screen Size Changes

No. I also use media queries for this in my examples if I don't have access to the content in the iframe.
See http://www.tinywebgallery.com/blog/advanced-iframe/advanced-iframe-pro-demo/show-only-a-part-of-the-iframe#e55

The interesting thing this is why Firefox and IE do not handle this. Because they should support this as well.

Best, Michael

Page 1 of 1 All times are UTC + 1 hour [ DST ]
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/