Jump to content

Centre Aligning a Simple List's bottom elements

Recommended Posts

I'm wondering if someone can help me. I have 7 pieces of content in a simple list as seen in the screenshot but I wan for the bottom 3 to be centred on the page. Is it possible to do this with code as I have tried many examples and none have worked.

Screenshot 2024-02-13 at 21.19.44.png

Link to comment
  • Replies 12
  • Views 1.4k
  • Created
  • Last Reply

Top Posters In This Topic

20 hours ago, NickG159 said:

My apologies, the problem is on the home page.

 

https://ellipsoid-brass-hh4r.squarespace.com/config/

Use this code to Website > Website Tools > Custom CSS

@media screen and (min-width:992px) {
.user-items-list-item-container[data-section-id="65c6423c3677b734f5593cf5"] li:nth-child(n+5) {
    position: relative;
    left: calc(~"50% + 25px");
}
}

image.thumb.png.819bd25de290db0f426ce839b8d87875.png

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
  • 3 weeks later...
On 3/6/2024 at 7:56 PM, NickG159 said:

Hey, I've had to add another item to the list and now the bottom row of 4 is off centre.  Can you tell me how to fix this?

 

Just remove code I sent.

My code will move items 5, 6, 7, 8...

so you can remove code, or change n+5 to n+9

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

Thank you. Can I also ask for your help on this.

 

I used code injection and custom css to allow for a drop down on this simple list. It works fine for desktop, but it is completely messed up when I change to mobile version. Can you help me with the layout of this on mobile?

Screenshot2024-03-06at15_56_26.png.840bca00ded465e413141b98342d31bd.png

Screenshot2024-03-06at15_56_37.png.a070ee6e381b2d9e9906e5f723edeb0d.png

Link to comment

You can use this code to Custom CSS box

@media screen and (max-width:767px) {
.user-items-list-item-container[data-section-id="65e86a914d9dc22172f5a3a5"] {
    grid-gap: 5px 5px !important;
    flex-wrap: wrap !important;
}
.user-items-list-item-container[data-section-id="65e86a914d9dc22172f5a3a5"] li {
    width: 50% !important;
    flex: unset !important;
}
}

 

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.