Jump to content

Making icons centered on mobile view

Go to solution Solved by Beyondspace,

Recommended Posts

Site URL: https://begonia-robin-tem5.squarespace.com/

password: fdp

I'm looking for help making it so that the icons under "The Partnership develops a framework through five action-oriented workstreams that:" are center-aligned on mobile.

This is the code I have currently, where the icons are still left-aligned on tablet and mobile:


/* responsive styling */
@mobile: ~"only screen and (max-width: 640px)";
@tablet: ~"only screen and (min-width: 641px) and (max-width: 1024px)";

/* icons on tablet */
@media @tablet {
#block-yui_3_17_2_1_1648735158703_107514,
#block-ef69b00fe740f68fb184, #block-020b149884e73b0eef84, #block-db30e412de4cbed74f07, #block-acdf7988f092c02c544c, #block-339fdb65d81639266291, #block-yui_3_17_2_1_1648734445081_29027 {
  width:75% !important;
  align-content: center !important;
}
#block-yui_3_17_2_1_1648734612944_35345, #block-yui_3_17_2_1_1648734612944_35947, #block-yui_3_17_2_1_1648734612944_36547, #block-yui_3_17_2_1_1648734612944_37171, #block-yui_3_17_2_1_1648734612944_37816 {
  text-align: left !important;
  width: 75% !important;
  }
}
#block-yui_3_17_2_1_1648734612944_35345 p, #block-yui_3_17_2_1_1648734612944_35947 p, #block-yui_3_17_2_1_1648734612944_36547 p, #block-yui_3_17_2_1_1648734612944_37171 p, #block-yui_3_17_2_1_1648734612944_37816 p {
    font-size: 1.1em !important;
} 

Thank you for any help!

Link to comment
  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

  • Solution
On 4/13/2022 at 2:24 AM, shannonpaton said:

Site URL: https://begonia-robin-tem5.squarespace.com/

password: fdp

I'm looking for help making it so that the icons under "The Partnership develops a framework through five action-oriented workstreams that:" are center-aligned on mobile.

This is the code I have currently, where the icons are still left-aligned on tablet and mobile:


/* responsive styling */
@mobile: ~"only screen and (max-width: 640px)";
@tablet: ~"only screen and (min-width: 641px) and (max-width: 1024px)";

/* icons on tablet */
@media @tablet {
#block-yui_3_17_2_1_1648735158703_107514,
#block-ef69b00fe740f68fb184, #block-020b149884e73b0eef84, #block-db30e412de4cbed74f07, #block-acdf7988f092c02c544c, #block-339fdb65d81639266291, #block-yui_3_17_2_1_1648734445081_29027 {
  width:75% !important;
  align-content: center !important;
}
#block-yui_3_17_2_1_1648734612944_35345, #block-yui_3_17_2_1_1648734612944_35947, #block-yui_3_17_2_1_1648734612944_36547, #block-yui_3_17_2_1_1648734612944_37171, #block-yui_3_17_2_1_1648734612944_37816 {
  text-align: left !important;
  width: 75% !important;
  }
}
#block-yui_3_17_2_1_1648734612944_35345 p, #block-yui_3_17_2_1_1648734612944_35947 p, #block-yui_3_17_2_1_1648734612944_36547 p, #block-yui_3_17_2_1_1648734612944_37171 p, #block-yui_3_17_2_1_1648734612944_37816 p {
    font-size: 1.1em !important;
} 

Thank you for any help!

Try adding to Home > Design > Custom Css

@media only screen and (max-width: 767px) {
  section[data-section-id="6245b120e1d1735f6071c7c7"] .span-2  {
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
  }
}

Let me know how it works on your site

Greeting, it's BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.
Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Keyword Highlighter
If you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you

Link to comment

My testing

image.png.808d3c9ffb81634f942a59bb3b630448.png

Greeting, it's BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.
Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Keyword Highlighter
If you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. 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.