Jump to content

100vh problem with ios safari JS +CSS Help

Recommended Posts

I'm attempting to test the JS + CSS solution found here: 100vh problem with ios safari but unsure how to successfully insert it into cone injection. It seems to me that the code is lacking script tags. Additionally if there is a better solution or recommendation on how I can solve this issue please share. Thank you.

I'm targeting: section[data-section-id="659641a7793d7440f55a4f47"]

const appHeight = () => {
 const doc = document.documentElement
 doc.style.setProperty(‘  app-height’, `${window.innerHeight}px`)
}
window.addEventListener(‘resize’, appHeight)
appHeight()
:root {
  app-height: 100%;
}
html,
body {
 padding: 0;
 margin: 0;
 overflow: hidden;
 width: 100vw;
 height: 100vh;
 height: var(  app-height);

 

Screen CAP.png

Link to comment
  • Replies 3
  • Views 1.3k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.