Danart Posted January 5, 2022 Share Posted January 5, 2022 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 Link to comment
Solution jpeter Posted January 5, 2022 Solution Share Posted January 5, 2022 @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 Danart 1 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
Danart Posted January 5, 2022 Author Share Posted January 5, 2022 25 minutes 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 Perfect. it's works well. Thanks jpeter for your help. Link to comment
Danart Posted January 5, 2022 Author Share Posted January 5, 2022 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. Link to comment
jpeter Posted January 5, 2022 Share Posted January 5, 2022 (edited) 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 January 5, 2022 by jpeter Danart 1 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
Danart Posted January 6, 2022 Author Share Posted January 6, 2022 3 hours ago, jpeter said: @Danart You can add margin-top: -25px; to the styles. Play with margin-top value to your liking. Thank you again. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment