Jump to content

How to code things to show 2 across on mobile

Recommended Posts

Site URL: https://tmha-new-site.squarespace.com/

Trying to get the following areas (on the homepage only right now) to shrink down to two across when on mobile:

  1. TESTIMONIALS area. Maybe also max it at 4 testimonials on mobile if possible? 
  2. PHOTO GALLERIES. There is 4 photos linking out to galleries. Can we make it so its 2x2 there?
  3. GLAM PERSONA. Again, make images 2x2?

password: tamara

Screen Shot 2021-12-22 at 5.35.51 PM.png

Screen Shot 2021-12-22 at 5.43.15 PM.png

Screen Shot 2021-12-22 at 5.44.07 PM.png

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

Top Posters In This Topic

  1. TESTIMONIALS area. Maybe also max it at 4 testimonials on mobile if possible? 

Change it to 4 items/row on mobile

Or

Show 4 items only, with 1 or 2item/row on mobile?

#2. PHOTO GALLERIES. There is 4 photos linking out to galleries. Can we make it so its 2x2 there?

Add to Design > Custom CSS

/* Mobile-Photo galleries */
@media screen and (max-width:767px) {
div#block-2092f412021efba54c86+.row>.span-3, div#block-2092f412021efba54c86+.row>.span-6 .span-3 {
    width: 50% !important;
    float: left !important;
}
}

#3. GLAM PERSONA. Again, make images 2x2?

Add to Design > Custom CSS

/* Mobile-Gram persona */
@media screen and (max-width:767px) {
div#page-section-61c0b2469abc8d6ded1ed073>.row:nth-child(2) .span-3 {
    width: 50% !important;
    float: left !important;
}
div#page-section-61c0b2469abc8d6ded1ed073>.row:nth-child(2) .span-3:nth-child(2n+1) {
    clear: left !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
On 12/27/2021 at 1:57 AM, ThisWayToFabulous said:

@tuanphan

For # 1: "show 4 items only, with 2item/row on mobile"

Hi,

#1. Testimonials

Can't keep carousel layout, You can use this code to change to grid, with 4 items and 2 items/row on mobile only.

/* Homepage Testimonial Mobile */
@media screen and (max-width:767px) {
div#block-yui_3_17_2_1_1638382146629_8388 {
	.summary-item {
    transform: unset !important;
    width: calc(~"50% - 10px") !important;
}
.summary-item-list {
    transform: unset !important;
}
.summary-item:nth-child(2n+1) {
    margin-right: 20px;
}
.summary-item:nth-child(n+5) {
    display: none;
}
header.summary-block-header {
    display: none;
}}}

#2. Edit code to this

/* Mobile-Photo galleries */
@media screen and (max-width:767px) {
div#block-2092f412021efba54c86+.row {
&>.span-3, &>.span-6 .span-3 {
    width: 50% !important;
    float: left !important;
}
.image-block {
    padding: 10px !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
16 hours ago, ThisWayToFabulous said:

@tuanphan i think this will work great, is there a way to just get a little padding down the middle so the photos dont touch?

IMG_8E5ABD93ADB9-1.jpeg

It looks like you removed summary, i don't see it now

Try, edit this line

Quote
margin-right: 20px;

to this

Quote
margin-right: 20px !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.