I looked at stackoverflow and it seems that position:fixed in an iframe for iOS mobile devices has been a problem in the past, but so far there has been no answer.
Here is an example that I created via jsbin: http://jsbin.com/pekeca/1/
In this example, there is a parent HTML page that uses an iframe that contains another HTML page (child). Here are some things to note:
- When parent HTML is viewed on any device, the navigation bar in the child HTML remains fixed. This is the intended behavior.
- However, when the parent HTML is viewed on the iPhone independently of the browser, the navigation bar in the child HTML file loses its fixed position. This is a bug that only happens on the iPhone.
- When a child HTML page is viewed directly (i.e. not inside an iframe) on the iPhone, the navigation bar remains in a fixed position and works fine.
Has anyone found a workaround for position:fixed on iPhone or iOS devices?
css ios iframe css-position
ayjay
source share