iOS devices experiencing issues with iframe responsiveness

Can someone take a look at this for me? I can't seem to figure out what's missing. I have an iframe with a width that extends beyond the Bootstrap 12 col I placed it in, despite setting up CSS to make it responsive. The site works fine in desktop browsers like Chrome and Safari during testing, but once it's posted on Github, the page doesn't function the same way.

It's worth noting that Bootstrap is fully responsive elsewhere on the site. Everything stays within the columns and adapts accordingly. When you load the page, you don't even notice the iframe until you scroll down to it. However, the Jumbotron, Navbar, etc., all work fine. I also included the necessary meta tag at the top.

<meta name="viewport" content="width=device-width, initial-scale=1">

Here's how the iframe is set up, ignoring my unusual DIV structure:

<div class="container">
    <div class="row">
    <div class="menu">
        <div class="col-xs-12">
            <iframe class="menuwindow embed-responsive-item" src="https://docs.linkhere"></iframe>
        </div>
    </div>
    </div>
</div>

And here's the CSS supporting the HTML for the frame:

.menuwindow {
margin-top: 10rem;
margin-bottom: 10rem;
height: 400px;
width: 1px;
min-width: 100%;
*width: 100%; 

I've blurred out the identity of who I'm working for.

Here's a screenshot of it looking fine in the dev browser:

https://i.sstatic.net/QdpoK.png

And here's a picture of it on an iOS device. Notice how it's spilling out of its container due to lack of padding on the right side.

UPDATE: I tried focusing on just the iframe without altering the class, but the issue persists.

https://i.sstatic.net/L2qZl.png

Answer №1

If you find yourself unable to modify the origin of the iframe, one workaround is to adjust the width of the iframe element to be smaller than the viewport and then override the styling accordingly.

Here's an example of how this can be achieved:

iframe {
    width: 1px;
    min-width: 100%;
    *width: 100%;
}

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

A guide to finding and selecting the recaptcha checkbox using Python and Selenium

I've attempted multiple methods to click on this checkbox using selenium without success. Link: I have tried using XPATH, CLASS_NAME, and other methods, but I keep getting the same result: no such element: Unable to locate element: Can someone provi ...

Exploring the Collapse and Dropdown features in Bootstrap 5 Navbar

Struggling with my navbar on Bootstrap 5 - the collapse feature isn't working after expanding, and the dropdown list fails to drop down. <!-- Using Bootstrap-5 --> <link href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-pro ...

Is it possible to retrieve the complete file path in a form?

My goal is to retrieve a file using an input element of type "file". This element is located within a partial view, and I need to send it to the controller or request it there using "Request.Form["inputFile"];". However, this method only provides me with t ...

Select an item from the options available

Looking to automatically select a specific item from a combobox upon clicking a button on my webpage. The page includes both PHP and JavaScript code for this functionality. Currently, I have a JavaScript function triggered by the "onclick" event of the bu ...

The authentication header used with AJAX in an iOS web app acting as a home button has malfunctioned

My webapp authenticates through a REST API that returns a user ID and a session token. This token is then included in future Ajax requests as an Authorization Basic Header for accessing secured endpoints of the API. Everything functions correctly on all br ...

Avoiding parent animations from affecting child elements using CSS

nav { display: inline-flex; align-items: center; width: 100%; height: 8rem; border-bottom: 1px solid black; } .nav-list { display: flex; width: 100%; } .nav-list li { line-height: 8rem; position: relative; } .sub-menu li { color: #c4 ...

What are the effective ways to fix an EAGLContext crash on iOS?

Currently, I am working on developing a live video call app using OpenTok (TokBox) by following this demo: https://github.com/opentok/opentok-ios-sdk-samples/tree/develop/5.Multi-Party-Call However, I have encountered an issue where my app crashes when I ...

Apply a 2 pixel top border to an HTML table

Is there a way to add a double border at the headcell without using background images? Currently, I have a white color border top and want to add a grey color border on top of the white one. Is it possible to achieve something like #ccc and #fff for borde ...

No action is triggered when the button is hovered over

I've implemented these hover effects but for some reason, they are not working as expected. I'm struggling to understand why this is happening. The primary button at the bottom is also experiencing the same issue. body { background-color: #aa ...

Where can I find a style element using Selenium in Python?

Hey there! I'm looking to find a style element or style elements using Selenium in Python. <div style="flex-direction: column; padding-bottom: 65px; padding-top: 0px;"> I've tried various methods such as: self.driver.find_element ...

Investigate the CSS display property of an element using JavaScript

Can JavaScript be used to determine if an element's CSS display == block or none? ...

Attempting to consistently place an element at the bottom of my div container

I am attempting to align my <span class="fechar_fancy">Back/span> at the bottom of my div, regardless of the height of my content. I want this element to always be positioned at the bottom. Therefore, I tried using position:absolute and bottom:0 ...

The significance of Z-index in Embedded Email Subscription Code

I am encountering an issue with a pop-up window I have created for visitors to sign up for our mailing list. The problem is that the CSS menu appears on top of the pop-up, despite setting the menu's z-index to 9999. How can I adjust the z-index in the ...

Conceal the dormant brothers and sisters within the nested list

My tool relies solely on JavaScript for functionality. I have created a nested list structure using JSON data: function buildList(data, isSub){ var html = (isSub)?'<div class="nested">':''; // Wrap with div if true ht ...

How to set a default value different from the available options using jQuery

<select id="itemDepartment"> <option value="1">Computer Accessories</option> <option value="2">Laptop</option> </select> the default value in the drop-down list can be set using the selected="selected" attribute. ...

What is causing the input elements in this form to display vertically in IE7, but horizontally in Firefox and Chrome?

My inquiry is straightforward. Here's the code snippet in question: <form action="results.php" style="" target="_top" method="post"> <input type="text" name="search_area" id="username_input" class="search_box" > <input type="image" onm ...

Steps for transferring PHP variables to a Bootstrap 4 modal

I am working on a Laravel project where I have implemented recursion to create different HTML elements for each item. My goal is to open a modal when clicking on these links and pass the appropriate variable based on the clicked element. EDIT: Changes mad ...

Passing an array of ID's between two components in Angular: A comprehensive guide

Greetings fellow readers, I have encountered a new challenge in my Angular project. I need to pass an array of IDs from one component to a completely unrelated component. Most solutions suggest using ViewChild, Input, or Output, but since the components ar ...

I've been stuck on this for the past hour, trying to figure out why /js/bootstrap.min.js can't be located

I'm having an issue with the code in base.html while trying to create a bootstrap starter template. I copied it from bootstrap but when I run it, I get an error related to /js/bootstrap.min.js. Can someone help me figure out what's wrong? Thank y ...

Searching for a JavaScript button via aria-label and interacting with it using Python Selenium

I am currently utilizing Python Selenium to locate and interact with a specific javascript button on a webpage. The solutions provided in various forums do not suit my needs as the button I am targeting is unique. To begin, I will display an image of the p ...