Jump to content

Floating Menu at bottom on mobile

Go to solution Solved by tuanphan,

Recommended Posts

Hi everyone.

I would like to have a simple menu of 4 buttons, similar to the one you can see in this screenshot.

Its intended for the mobile version only. It should appear on the whole website.

If you scroll down, the 4 buttons stay there all the time.

Id appreciate any help!

WhatsApp Image 2023-10-16 at 14.22.16_17eb844e.jpg

Link to comment
  • 2 weeks later...
On 10/31/2023 at 10:02 PM, UTGca said:

Hi,

It should open a new URL on the same tab.

Thank you!

Yes. It is possible, we will need to use some custom code

Can you share link to your site? We can test & give exact code 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
  • 2 weeks later...
  • 3 weeks later...

Use this tool to Website Tool > Code Injection > Footer. You can adjust text/url in the code

<div class="sticky-bar-mobile">
    <div class="item">
       <a href="google.com">
        <div class="icon">
         <img src="https://cdn.pixabay.com/photo/2017/06/30/10/57/icon-2457971_640.png" alt="Item 1">
        </div>
        <div class="text">Reservas</div>
      </a>
    </div>
  
    <div class="item">
        <a href="google.com">
        <div class="icon">
           <img src="https://cdn.pixabay.com/photo/2017/06/30/10/57/icon-2457978_640.png" alt="Item 2">
        </div>
        <div class="text">Menu digital</div>
      </a>
    </div>
  
    <div class="item">
       <a href="google.com">
        <div class="icon">
           <img src="https://cdn.pixabay.com/photo/2017/06/22/10/07/icon-2430237_640.png" alt="Item 3">
         </div>  
        <div class="text">Domicilious</div>
      </a>
    </div>
  
    <div class="item">
       <a href="google.com">
        <div class="icon">
           <img src="https://cdn.pixabay.com/photo/2017/06/30/10/57/icon-2457974_640.png" alt="Item 4">
        </div>
        <div class="text">redes</div>
      </a>
    </div>
</div>
<style>
  @media screen and (min-width: 768px) {
  .sticky-bar-mobile {
    display: none !important;
  }
} 
.sticky-bar-mobile {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background-color: #b80f0a;
            display: flex;
            justify-content: space-around;
            align-items: center;
            padding: 10px;
            box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
            color: #fff;
        }

.icon {
            display: block;
            font-size: 24px;
            margin-bottom: 5px;
            text-align: center;
        }

.text {
            font-size: 16px;
        }
 .item img {
            width: 24px; /* Adjust the width as needed */
            height: 24px; /* Adjust the height as needed */
            margin-bottom: 5px;
}
.item a {
            text-decoration: none;
            color: #fff;
            display: block;
 }

</style>

 

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

Thank you! It worked perfectly as you can see it at uptowngrill.ca.

Any idea how to make it always appear on mobile? Right now it is only visible when you scroll down.

I used Google Material Icons instead of images. Any clue on how to center each individual icon to align centered with text label?

Thank you again!

Link to comment
  • Solution
On 12/9/2023 at 9:38 PM, UTGca said:

Thank you! It worked perfectly as you can see it at uptowngrill.ca.

Any idea how to make it always appear on mobile? Right now it is only visible when you scroll down.

I used Google Material Icons instead of images. Any clue on how to center each individual icon to align centered with text label?

Thank you again!

Add this code under

<style>
  .sticky-bar-mobile {
    z-index: 9999999 !important;
}
  @media screen and (max-width:767px) {
  .item * {
    text-align: center !important;
    margin-left: auto;
    margin-right: auto;
}
  }
</style>

image.png.74bb81125711d1d5ee4b8680170cf044.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

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.