How to make a header link standout like a button?

Topic summary

A user seeks to style a header menu link (‘Book a free design visit’) to resemble a button with distinct background color and text styling.

Solutions Provided:

  • Multiple CSS approaches were shared targeting the specific link ID (#HeaderMenu-book-a-free-design-visit)
  • Code snippets include background colors, border-radius, and padding to create button-like appearance
  • One solution uses <style> tags inserted before the </body> tag in theme.liquid
  • Others recommend adding CSS directly to base.css/style.css files

Issue Encountered:
Initial implementations caused the link text to disappear or match the background color when clicked/visited. Updated code was provided to maintain white text color across all page states.

Related Request:
A second user requested similar styling for a ‘Sign-In’ button linking to an external site, asking for:

  • Blue color matching existing ‘Learn More’ buttons
  • Right alignment adjustment
  • Standard theme hover effects (instead of blue underline)

The discussion remains active with the second request awaiting final implementation details.

Summarized with AI on October 31. AI used: claude-sonnet-4-5-20250929.

Hi

https://www.morganskitchensandbedrooms.co.uk/

This is my website that I am currently working on.

Does anyone know how I can make the ‘Book a free design visit’ at the top of my website stand out more.

I want to change it to a different colour text and maybe put a background behind only that to make it stand out and act like it’s a button itself.

Any help would be appreciated so so much!

Many thanks

1 Like

Hi @Morgans , you mean something like that:

Yes something exactly like that!

Hi @Morgans ,

You can add below code to add background to the “Book a free design visit” button

Follow these Steps:

  1. Go to Online Store

  2. Edit Code

  3. Find theme.liquid file

  4. Add the following code just above tag


If you require further help to optimize your store, please don’t hesitate to reach out. If you find this information useful, a Like would be greatly appreciated. And if this solves the problem, please Mark it as Solution!

Best Regards,
Makka

ok, go to base.css and add the following code :

a#HeaderMenu-book-a-free-design-visit {
    background-color: #010101;
    color: #fff !important;
    border-radius: 7px;
}

Hi That looks great but once selected, the linked text disappears and is the same colour as the background, there any way to keep it white?

Hi, This looks so good but it’s just when I click on it and go to the page, the linked text changes to the same colour as the background?

Can you provide a screenshot?

Hi @Morgans ,

Please replace the previous code with this new one. This new code should work on all pages.


Hi @Morgans

Check this one.

  • From your Shopify admin dashboard, click on “Online Store” and then “Themes”.
  • Find the theme that you want to edit and click on “Actions” and then “Edit code”.
  • In the “Assets” folder, click on “base.css, style.css or theme.css” file, depending on which file your theme uses to store its CSS styles. At the bottom of the file, add the following CSS code:
a#HeaderMenu-book-a-free-design-visit {
    border: 1px solid;
    border-radius: 20px;
}
a#HeaderMenu-book-a-free-design-visit:after, a#HeaderMenu-book-a-free-design-visit:before {
    content: '';
    position: absolute;
    top: 0;
    background: rgb(var(--color-foreground));
    color: rgb(var(--color-background));
    border: 1px solid;
    border-radius: 20px;
}

Please don’t forget to Like and Mark Solution to the post that helped you. Thanks!

Hi @Morgans ,

As you have already implemented solution on the live site, I request you to mark my answer as a solution :slightly_smiling_face:

Hi there - are you able to help me do the the same for the Sign-In button on my site? It links to an external website.

https://jyqxei-gf.myshopify.com/pages/pedalace-for-schools-organizations pw sayfao

Hi @Serena_Burton

Thanks for reaching out, check this one.

  1. From your Shopify admin dashboard, click on “Online Store” and then “Themes”.
  2. Find the theme that you want to edit and click on “Actions” and then “Edit code”.
  3. In the “Assets” folder, click on “base.css, style.css or theme.css” file, depending on which file your theme uses to store its CSS styles. At the bottom of the file, add the following CSS code:
a[href="https://learn.pedalace.com/users/sign_in"] span {
    border: 2px solid #121212;
    padding: 8px 18px;
}

Please don’t forget to Like and Mark Solution to the post that helped you. Thanks!

Thank you so much! Can you please help me create it in the blue color like the “Learn More” button on this page? https://jyqxei-gf.myshopify.com/pages/pedalace-for-schools-organizations

I’d like to float it further to the right as well, and I would like to have the standard button hover treatment from the theme (it’s currently showing a blue underline on hover).

Appreciate your help!