CSS issues: fixed in iOS 9 iPhone 6+ in landscape mode

I found a strange problem with my fixed header under the following conditions:

  • iphone 6+ landscape mode
  • safari, open at least two tabs
  • my page has position: fixed heading and body and html with position: relative, height: 100%

After loading the page and scrolling down, everything works fine, the title is in place, and the web inspector shows it correctly:

enter image description here enter image description here

But when you scroll up and drag the page down the screen and release, the title is still displayed on the page, but in fact it moves somewhere under the viewport (see that the web inspector does not select it).

enter image description here

This fact leads to the fact that all title elements are inaccessible: you cannot open the menu, click on the logo or contact button.

The header returns to normal when:

  • you scroll down (but breaks again when you scroll back)
  • switch to another tab and back
  • or close other tabs

I tried changing the DOM and / or CSS of the header and body, but nothing returns the title to its normal state.

Any thoughts on how this can be fixed?

+6
source share
1 answer

I'm sorry to be the messenger of the bad news, but I have no idea what your actual problem is, since you did not provide the actual code. However, I would suggest that since your position:fixed problem, the best way to fix it is to stop using position:fixed , as it does not seem to work for you. Here's how you can emulate it evenly using only absolute and relative positioning:

 <html id="eHTML"> <style> #eHTML { position: static } #eBODY { position: relative; overflow:hidden } #eHTML, #eBODY, #main { width: 100%; height: 100%; margin: 0; top: 0 } #eBODY>div { position:absolute; left:0;bottom:0 } #footer {height: 20%;background-color:#88f;width:calc(100% - 14px)/*to account in for 14px scrollbar*/;overflow:hidden} #main {background-color:#ff8;width:100%;height:100%;overflow:auto} </style> <body id=eBODY> <div id=main> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p> <p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> <p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p> <p>Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum</p> <p>Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium,</p> <p>totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.</p> <p>Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.</p> <p>Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit,</p> <p>sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem.</p> <p>Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur?</p> <p>Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur,</p> <p>vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?</p> <br /><br /><br /><br /> </div> <div id="footer"> Some Random Fixed<br /> Content! Yay, it workz! </div> </body> </html> 
0
source

All Articles