Jump to content

Any tips for getting blocks of code to appear side by side in mobile view?

Recommended Posts

Site URL: https://amalfimedia.com/binge-test/3qf81s6jhgfr6aswexviakq9yyhe96-sg6rx-fyacd

Hello all!

So I have 4 "listen on" badges at the top of my blog for things apple podcasts, spotify, stitcher, and google podcasts. I've attached how they look on desktop and how they look on mobile. They are code element. Does anyone know how I can make the badges on mobile stack the same way they do on desktop? I'd like for Apple pod & spotify to be next to each other; google pod and stitcher next to each other. On mobile they all stack on top of each other.

Thanks for the help! 

Desktop.png

Mobile.png

Link to comment
  • Replies 3
  • Views 437
  • Created
  • Last Reply
16 hours ago, TheNattyD said:

Site URL: https://amalfimedia.com/binge-test/3qf81s6jhgfr6aswexviakq9yyhe96-sg6rx-fyacd

Hello all!

So I have 4 "listen on" badges at the top of my blog for things apple podcasts, spotify, stitcher, and google podcasts. I've attached how they look on desktop and how they look on mobile. They are code element. Does anyone know how I can make the badges on mobile stack the same way they do on desktop? I'd like for Apple pod & spotify to be next to each other; google pod and stitcher next to each other. On mobile they all stack on top of each other.

Thanks for the help! 

Desktop.png

Mobile.png

Use this css


@media only screen and (max-width: 600px) {
      #block-8fa1184a2f92463bd584 + .row .span-2,
      #block-8fa1184a2f92463bd584 + .row .span-10{
         width: 50% !important;
        float: left !important;
      }
      #block-8fa1184a2f92463bd584 + .row + .row .span-2,
      #block-8fa1184a2f92463bd584 + .row + .row .span-10{
         width: 50% !important;
        float: left !important;
      }
}


@media only screen and (min-width: 600px) and (max-width: 768px) {
      #block-8fa1184a2f92463bd584 + .row .span-2,
      #block-8fa1184a2f92463bd584 + .row .span-10{
         width: 30% !important;
        float: left !important;
      }
      #block-8fa1184a2f92463bd584 + .row + .row .span-2,
      #block-8fa1184a2f92463bd584 + .row + .row .span-10{
         width: 30% !important;
        float: left !important;
      }
}

image.png.16b3fe445ef546d56db5b36748785fc6.png

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment
6 hours ago, bangank36 said:

Use this css



@media only screen and (max-width: 600px) {
      #block-8fa1184a2f92463bd584 + .row .span-2,
      #block-8fa1184a2f92463bd584 + .row .span-10{
         width: 50% !important;
        float: left !important;
      }
      #block-8fa1184a2f92463bd584 + .row + .row .span-2,
      #block-8fa1184a2f92463bd584 + .row + .row .span-10{
         width: 50% !important;
        float: left !important;
      }
}


@media only screen and (min-width: 600px) and (max-width: 768px) {
      #block-8fa1184a2f92463bd584 + .row .span-2,
      #block-8fa1184a2f92463bd584 + .row .span-10{
         width: 30% !important;
        float: left !important;
      }
      #block-8fa1184a2f92463bd584 + .row + .row .span-2,
      #block-8fa1184a2f92463bd584 + .row + .row .span-10{
         width: 30% !important;
        float: left !important;
      }
}

image.png.16b3fe445ef546d56db5b36748785fc6.png

You are amazing! Follow up question, if I did this for 100+ blog posts would it dramatically slow down my website? I know how to customize the code for each blog post but I also don't want to jeopardize the user loading experience. Thanks so much for a solution 🙂

Link to comment
2 minutes ago, TheNattyD said:

You are amazing! Follow up question, if I did this for 100+ blog posts would it dramatically slow down my website? I know how to customize the code for each blog post but I also don't want to jeopardize the user loading experience. Thanks so much for a solution 🙂

If you x100 this snippet it may add ~100kb to the site, i dont think it effect that much. But if you are after the most effective way, then javascript may need to be used

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.