KDEnright Posted November 5, 2023 Posted November 5, 2023 Hello, I have an embedded data block (iframe) on my site that is showing results from a form. The block is fine on pc, however it is too wide for the mobile version. The code is: <iframe width="600" height="371" seamless frameborder="2" scrolling="YES" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vT8TawtcQ0HoaFQMbqwx6WCTwVv2E-J5dL-tXyTHVP_i9XdydFajnohmGyFEBuccRcuQfWec6-Yd2jF/pubchart?oid=817034620&format=interactive"></iframe> I have tried adjusting the width, however it just cuts the info off. This is a really important part of my site, so appreciate assistance on making sure the chart in the iframe is visible on mobile! Thank you!
tuanphan Posted November 7, 2023 Posted November 7, 2023 You can add this code under your iframe code <style> @media screen and (max-width:767px) { iframe[src*="google"] { width: 100% !important; height: auto !important; } } </style> Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment