Jump to content

[Share] 3 stacked buttons to Header

Recommended Posts

image.png.c47c074ee0b8d218104be1f2097f8c7d.png

#1. Use this code to Code Injection > Footer (replace example button text/URL with your desired text/URL).

<a class="btn btn--border theme-btn--primary-inverse sqs-button-element--primary second-button" href="https://google.com">Button 02</a>
<a class="btn btn--border theme-btn--primary-inverse sqs-button-element--primary third-button" href="https://ebay.com">Button 03</a>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script>
  $(document).ready(function(){
    $('a.second-button').insertAfter('a.btn');
    $('a.third-button').insertAfter('a.second-button');
});
</script>

image.png.d42ecb982bd2924ff9046323b7c8ec87.png

#2. Use this code to Website Tools > Custom CSS

a.second-button, a.third-button {
    display: none;
}
header#header a.second-button, header#header a.third-button {
    display: inline-block !important;
    margin-top: 5px;
}
div.header-actions-action--cta {
    flex-direction: column;
    display: flex;
}

image.png.cfe31cdec3b4fe919e2651a1d48aa25b.png

#3. Result

image.png.c47c074ee0b8d218104be1f2097f8c7d.png

#4. To change button style, you can adjust these to secondary or tertiary

image.png.4c6e5640cfa78d191a7341b8319477d5.png

If you can't make it work properly, you can comment site url below, I 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
  • Replies 0
  • Views 939
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

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.