Jump to content

Adding a Floating Button for "Contact" visible on mobile only?

Recommended Posts

Here is a blog post that has a CSS code snippet and video tutorial for how to do this on 7.1 templates: https://blog.tawfiq.me/how-to-add-a-button-to-mobile-header-between-logo-and-menu-icon-squarespace/

If you are looking for something a little more robust that lets you add up to 3 visible menu items on mobile devices, I have a plugin available on my website that does just that!

(this is not an affiliate link - I created the plugin myself)

Edited by Caroline_Smith

Feel free to email me with any customization inquiries or questions you may have!

Free Squarespace Resources: DevTools Minicourse,  11-Step Guide to Improve Custom CSS, Free Product/Pricing Comparison Table Generator

Link to comment
On 2/11/2022 at 4:46 AM, katelyn.benton said:

Awesome! I added the button to the footer, do you know the code I can use to make it float on mobile only?

Add to Design > Custom CSS

div#block-yui_3_17_2_1_1644529381809_7144 a {
    position: fixed;
    bottom: 2vw;
    right: 2vw;
    z-index: 9999;
	display: none;
}
@media screen and (max-width:767px) {
div#block-yui_3_17_2_1_1644529381809_7144 a {
    display: block !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
19 hours ago, tuanphan said:

Add to Design > Custom CSS

div#block-yui_3_17_2_1_1644529381809_7144 a {
    position: fixed;
    bottom: 2vw;
    right: 2vw;
    z-index: 9999;
	display: none;
}
@media screen and (max-width:767px) {
div#block-yui_3_17_2_1_1644529381809_7144 a {
    display: block !important;
}
}

 

Thank you! This worked perfectly.

Link to comment
  • 1 year later...
8 hours ago, PEARLERwork said:

@tuanphan I've attempted the code above but unfortunately, it doesn't seem to work? I believe these codes used to work but maybe something has changed with Squarespace. 

https://www.emilywylde.co.uk/ (mobile footer button)

You mean hide Book a Project button on desktop?image.png.9fcee4288c8f520c9604a6470496d777.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
On 8/28/2023 at 9:42 AM, PEARLERwork said:

@tuanphan We love the header button being fixed in the corner on desktop. However we'd like it to do the same on mobile, but of course it's hidden inside the mobile menu! 🙂

Use this CSS to make it appear on mobile

.header-actions.header-actions--right, .header-actions.header-actions--right div {
    display: block !important;
}
body.header--menu-open header#header .header-menu-cta {
	visibility: hidden;
}

 

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
  • 4 weeks later...

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.