Jump to content

How to prevent button overlap when resizing window?

Recommended Posts

Site URL: https://bonjrmusic.com/music

Hello,

I have 4 buttons in a single row on the website page linked. However, when I resize the window, some of the buttons end up overlapping. How does one prevent this behavior?

I'm also noticing the header links ('home', 'music', 'videos', etc.) become two rows as the window size gets smaller. Looking around at other websites, it seems that they maintain a single row and adjust according to the window size by either having the links remain fixed (which i'm actually seeing with the squarespace forum header), scaling down (youtube) or trimming the content (soundcloud). Does anyone know the code for each of these three different approaches so I could test it out?

Appreciate any help I can get!

Thanks,
Daniel

Link to comment
  • Replies 4
  • Views 3k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

On 4/12/2022 at 10:27 AM, thefakedaniel said:

Site URL: https://bonjrmusic.com/music

Hello,

I have 4 buttons in a single row on the website page linked. However, when I resize the window, some of the buttons end up overlapping. How does one prevent this behavior?

I'm also noticing the header links ('home', 'music', 'videos', etc.) become two rows as the window size gets smaller. Looking around at other websites, it seems that they maintain a single row and adjust according to the window size by either having the links remain fixed (which i'm actually seeing with the squarespace forum header), scaling down (youtube) or trimming the content (soundcloud). Does anyone know the code for each of these three different approaches so I could test it out?

Appreciate any help I can get!

Thanks,
Daniel

Try adding to Home > Design > Custom Css

#block-yui_3_17_2_1_1648729481274_4469 + div > .col:not(.span-0) {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 20% !important;
} 
#block-yui_3_17_2_1_1648729481274_4469 + div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

@media only screen and (max-width: 1203px) {
  #block-yui_3_17_2_1_1648729481274_4469 + div > .col:not(.span-0) {
    width: 100% !important;
  } 
}

My codes will arrange these buttons into one column if you resize the width of your browser.

Let me know how it works on your site

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

My testing

image.thumb.png.1c9e52f9da8bf4eecbd6d1bbdfe0e93d.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
3 hours ago, bangank36 said:

Try adding to Home > Design > Custom Css

#block-yui_3_17_2_1_1648729481274_4469 + div > .col:not(.span-0) {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 20% !important;
} 
#block-yui_3_17_2_1_1648729481274_4469 + div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

@media only screen and (max-width: 1203px) {
  #block-yui_3_17_2_1_1648729481274_4469 + div > .col:not(.span-0) {
    width: 100% !important;
  } 
}

My codes will arrange these buttons into one column if you resize the width of your browser.

Let me know how it works on your site

Thanks,

I just tried it out and here is the behavior I am seeing:

https://i.gyazo.com/7f5ac9282d56d4ccbeb819d125f65d13.mp4

Still a bit of overlap before it snaps into the column, not sure if that's what you intended.

Edited by thefakedaniel
Link to comment
  • 1 month later...
8 hours ago, allenandcocreative said:

Hello!

I'm having a similar issue with a site I designed for a client: https://brickandmantel.com

When resizing the browser window, the menu items overlap. My client is not happy with this and I'm not sure how to figure out the CSS to fix this. I'm hoping you perhaps can help,with a version of css that would work for my site? Any help would be greatly appreciated.

Best,

Shelly

How about reduce font size, or force burger menu appear on these screen sizes? If you like this, we will try checking & give the code

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.