Jump to content

Resize first section of homepage to user's window

Recommended Posts

Posted

Site URL: https://www.claritude.app/

On my site at the top section of the homepage, I have two abstract wave images in the top right and bottom left corner that frame the top section. My problem is that on devices with different aspect ratios, these images get shifted up and down in a way that makes the top section look terrible. Is it possible using HTML or CSS to:

1. Detect the size of the user's window

2. Resize just the top section of the homepage so that its height matches the user's window height, while keeping the wave images in the top right and bottom left corner?

  • Replies 1
  • Views 420
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted

There should be a css solution, something along the lines of 

.homepage section:first-of-type {
  height: 100vh;
}

It might need a little tweaking but I can't tell because you've incorrectly inserted some Javascript that is affecting the layout. 

I'm Colin Irwin aka silvabokis.  I've been a Squarespace designer & developer since 2013. 
You might want to check out my
Squarespace Template Finder or read my Squarespace tips
Speaking of tips, 💲I've got a tip jar. Feel free to throw a few quid into if you think I've helped you. 

If you're looking for a Squarespace developer Book a chat or Drop me a line - first meeting is always free  

 

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.