Jump to content

Responsive vertical and horizontal align content within Squarespace block across all devices.

Recommended Posts

Site URL: https://www.ofnoevil.com/home-v2

Hello,

The image on my site page here: https://www.ofnoevil.com/home-v2 does not align in the center when being viewed across devices. It's default stage is to be top aligned across all devices.

I am looking for help with creating code that will automatically position the image within the div so that on any device it is responsively moving towards the center.

Thank you,

Danerick

Link to comment
  • Replies 6
  • Views 621
  • Created
  • Last Reply

Top Posters In This Topic

On 9/8/2021 at 8:15 PM, workdp said:

Hi,
 

No it is only centered on some devices via Padding. So it is not always centered (only faking it at the moment).

Which screen size do you have problem? I think we can set code for all specific screen sizes.

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
On 9/13/2021 at 8:25 AM, workdp said:

It would be more mobile (<700 px)

Add to Design > Custom CSS

@media screen and (max-width:767px) {
div#block-yui_3_17_2_1_1631026373092_2561 {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    z-index: 9999;
    width: 90%;
}
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

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.