Aroha Visuals

View Original

How to adjust Search Bar height padding with CSS code in Squarespace 7.1?

Sometimes, you just gotta squish in that search bar somewhere down in the footer. But no matter how you position it, the search bar just doesn't look even with the other elements.

In this tutorial, I'll share with you the code I use to modify the Search Bar so that it fits inline with the rest of the footer. Spoiler: it's all in the padding!

IF YOU WANT WEBSITE LEADS ON AUTOPILOT, CHECK OUR MASTERCLASS:

See this content in the original post

Firstly, there are a few preparation steps to help speed up this process:

  1. Make sure you have the (free) Code-Block Identifier Chrome Extension installed - and read this article about Sourcing Block IDs

  2. Work in Chrome so you can use the Block-Identifier

  3. You have a Squarespace Business Plan or higher (no custom CSS code in Personal plans)

Great, now let's move on to a real example.

. . .

Adjusting Search Bar padding in the footer

1. Use Chrome Block Identifier to source block ID (this is the search bar block)

2. Go to Design > Custom CSS > Then copy & paste the following codeā€¦

See this content in the original post

3. Adjust the padding values and play around to see what fits best for you.

4. You can also adjust the font size to be smaller, as this will also decrease the search bar height

Extra Tip for adjusting Search Bar padding

In Code #1: We modified the padding top and bottom to be 10px, which in turn, decreases the white space and thus, makes the search bar appear narrower in height.

In Code #2: We are using its block ID - ie. referring to the block itself. By setting the padding top & bottom to 0px or 0%, it allows the search bar to move up into that white space, thus making it look more 'in-line'.

See this content in the original post

Try it out and let me know how you went! If you have any questions, comment below or slide in my DMs @arohavisuals.


Similar articles you will love:

See this gallery in the original post