Jump to content

How to display header button on mobile

Go to solution Solved by tuanphan,

Recommended Posts

Site URL: https://www.swiftsbf.com/

Hello! Hoping someone can help me with displaying the header button on mobile. The settings for the header layout show a button, however it does not actually display... having chatted with squarespace user support, they told me it hides when "it can't fit" (even at ipad size screen it is hidden 😞 ) and that otherwise it can only be accomplished with custom code. There's definitely room in the header, even on a very small mobile screen, so i'd like to do it!

Screen Shot 2021-08-17 at 2.11.02 PM.png

smartbiz.png

Screen Shot 2021-08-17 at 2.12.29 PM.png

Screen Shot 2021-08-22 at 10.06.24 PM.png

Link to comment
On 8/24/2021 at 5:14 AM, Yakob said:

@tuanphanI am using the personal plan at the moment, version 7.1

Add to Design > Custom CSS

@media screen and (max-width:767px) {
.header-actions.header-actions--right {
    display: block !important;
}

.header-actions-action.header-actions-action--cta {
    display: block;
}

.header-title-nav-wrapper {
    flex: 1 0 calc(~"100% - 150px") !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
  • 1 year later...
  • Solution
On 10/29/2022 at 12:28 AM, kvfranz said:

hey @tuanphan I used this snippet and it worked. Thanks. But I can't get a space between the hamburger and button. Any thoughts on how to move the button on mobile only to center or a little farther away from the hamburger? 

IMG_1C181C1A0EA3-1.jpeg

Try this new code. If it doesn't work, please share site url, we can check easier

@media screen and (max-width:767px) {
.header-actions.header-actions--right {
    display: block !important;
}

.header-actions-action.header-actions-action--cta {
    display: block;
	position: relative;
	left: -30px;
}

.header-title-nav-wrapper {
    flex: 1 0 calc(~"100% - 150px") !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
  • 3 weeks later...
  • 4 weeks later...
On 12/11/2022 at 11:16 PM, TecTonic said:

I'm having a similar problem that maybe @tuanphan can help.

I've used some of your code to display my navi button, but I',m having problem fitting in the frame and appearing in the various breakpoints before desktop.

Can you help?

image.thumb.png.1b920308f3f6c129562013d91a0c27cc.png

Hi,

What is your site url? We can check easier

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
  • 6 months later...

hello i am having the same issue and I have no idea how to fix it, I am not the best with the back end of my website. I would like a button that is in my header to show on both desktop and mobile. at the moment you can only see it on desktop

 

Link to comment
On 7/13/2023 at 8:27 AM, nixen said:

hello i am having the same issue and I have no idea how to fix it, I am not the best with the back end of my website. I would like a button that is in my header to show on both desktop and mobile. at the moment you can only see it on desktop

 

What is your site url? We can check easier

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
  • 3 months later...
On 11/1/2023 at 12:30 PM, TEK47 said:

Hello I am having the same issue and am not too tech savvy, where do I add this code in the big CSS list please? Is this in website tools, custom CSS?

Custom CSS, bottom of your CSS box

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 11/6/2023 at 7:54 AM, TEK47 said:

Is there a way we can make a phone icon button please? Is it possible to have 2 buttons in the header?

Yes. Possible. What is site url + Which button text + url? We can help easier

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 11/12/2023 at 11:10 PM, JB89_ said:

Hi, I am trying to add the button to my mobile site, but the CSS currently hasn't been able to do the trick.
Website link www.asbestbros.be 
This is the web version, I would like the same button to show on mobile. image.thumb.png.935e273bef816e904e52963d4d2f3028.png

image.png.346517208fe7cc352204f30e83c2cfc9.png

I see you figured it out but button overflow the screen. You can add this code to Website > Website Tools > Custom CSS to resize button on mobile

@media screen and (max-width:991px) {
a.btn {
    font-size: 10px !important;
    padding: 10px 10px !important;
    position: relative;
    left: -10px;
}
}

 

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.