Jump to content

[Share] Search icon next to Burger

Recommended Posts

If you can't make it work, you can comment below with site url or message me, I can check easier.

To add Search Icon next to Burger, you can use this code to Website > Website Tools > Code Injection > Footer.

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script>
$(document).ready(function(){
$('<a href="/search" class="mobile-search-icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"/></svg></a>').appendTo('.header-burger');
});
</script>
<style>
a.mobile-search-icon svg {
    width: 20px;
    fill: white;
}
.header-burger {
    flex-direction: row-reverse;
    align-items: center;
}
a.mobile-search-icon {
    position: relative;
    top: -5px;
}
</style>

image.png.d0217d434806df1f0aa611452929d23c.png

 

result

image.png.ee48803e5c1d0288153fc64c9dd56e5a.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
  • Replies 2
  • Views 227
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

On 6/5/2024 at 2:55 AM, tuanphan said:

If you can't make it work, you can comment below with site url or message me, I can check easier.

To add Search Icon next to Burger, you can use this code to Website > Website Tools > Code Injection > Footer.

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script>
$(document).ready(function(){
$('<a href="/search" class="mobile-search-icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"/></svg></a>').appendTo('.header-burger');
});
</script>
<style>
a.mobile-search-icon svg {
    width: 20px;
    fill: white;
}
.header-burger {
    flex-direction: row-reverse;
    align-items: center;
}
a.mobile-search-icon {
    position: relative;
    top: -5px;
}
</style>

image.png.d0217d434806df1f0aa611452929d23c.png

 

result

image.png.ee48803e5c1d0288153fc64c9dd56e5a.png

I did this however it is not aligned with the burger icon.

Can I design the search page?

https://refinedspaces.uk

Link to comment
10 hours ago, Chvntelle said:

I did this however it is not aligned with the burger icon.

Can I design the search page?

https://refinedspaces.uk

#1. Can you take a screenshot of problem? I can imagine easier.

#2. How do you want to adjust the search page?

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.