Where can I find documentation about the new behavior of the IFRAME element in iOS 5 Safari? Empirical evidence suggests that IFRAMEs now will expand to fit the content, expanding the containing document to do so, thereby often breaking code that works fine in iOS4.3 (and desktop browsers).
Is there any way to control this new behavior?
I couldn't find any official documentation that lists the differences of the <iframe>
tag in iOS5, but I found these links which do explain a little bit about the new <iframe>
tag/changes in iOS5 safari.
New Mobile Safari stuff in iOS5
iOS SDK Release Notes for iOS 5.0
Handling Events, Safari Web Content Guide
You mentioned that the <iframe>
tag now stretches to the width of the content inside it. Would you want it to be a set width?
You could either...
iframe
in css to the width you want it (I'm sure you've tried this)body
tag so that the iframe
doesn't stretch outside of it (not sure if this works)<div>
around the content being retrieved by the iframe
that has a set widthEdit: I just read the comment saying to style the iframe
directly, but you mentioned it doesn't work. I'd try styling the container div
instead, if that's an option.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With