Jump to content

[Wells Template] Edit position of Main-Content block to a center

Go to solution Solved by jpeter,

Recommended Posts

Site URL: https://www.danartriatmojo.com/instagram

Hi All,

I'm trying to make a custom page where the whole content is on a center of a page on the Desktop version or a mobile version without a sidebar.
I already hide the sidebar using this code:

#collection-61d4f6be1430494a8d778435 {
      header, footer, .sqs-announcement-bar-dropzone, .Mobile {
             display: none !important;
  }
 }

but having trouble to making the main-content on a center.

Appreciate any help I can get.

Thanks

Screen Shot 2022-01-05 at 11.01.07.png

Link to comment
  • Solution

@Danart The following CSS seems to work:

#page {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  display: grid;
  align-items: center;
}

See following article on how to add CSS if you don't know how https://support.squarespace.com/hc/en-us/articles/206545567#toc-add-css-code

Full stack developer who loves helping people out with anything web related. If you'd like to support me, buy me a coffee!

Link to comment
6 hours ago, jpeter said:

@Danart The following CSS seems to work:

#page {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  display: grid;
  align-items: center;
}

See following article on how to add CSS if you don't know how https://support.squarespace.com/hc/en-us/articles/206545567#toc-add-css-code

Hi JPeter,

Once quick question. What parameter do I need to change in order to move the content slightly up from the center. screengrab attached.1457942432_ScreenShot2022-01-05at18_30_21.thumb.png.224bc17f6765281ca853042b012b81d1.png

Link to comment
9 hours ago, Danart said:

Once quick question. What parameter do I need to change in order to move the content slightly up from the center. screengrab attached.

@Danart You can add margin-top: -25px; to the styles. Play with margin-top value to your liking. 

Edited by jpeter

Full stack developer who loves helping people out with anything web related. If you'd like to support me, buy me a coffee!

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.