How can I add a pill-shaped donate button to my Dawn theme header?

Topic summary

A user wants to style a navigation link (\

Summarized with AI on November 8. AI used: claude-sonnet-4-5-20250929.

Hi all,

I am using the Dawn Theme. I would like one of my links in my top navigation to be turned into a pill shaped button. I want the link “Donate” to be turned into that button. Does anyone know how I would go about doing that? I want the color of the button to be green. I also want it to be a decent size button to it kinda stands out since it is one my the most important links in my top navigation.

My site is www.PennsylvaniaParks.org

Thanks in advance!

1 Like

Hi @Justin34

May I suggest to update code these steps:

  1. Go to Store Online-> theme → edit code
  2. Assets/base.css
  3. Add code below to bottom of file
.header  .header__inline-menu .list-menu > li:last-child > a{
	background: green;
	border-radius: 40px;
	text-decoration: none !important;
	padding-left: 30px;
	padding-right: 30px;
}
.header  .header__inline-menu .list-menu > li:last-child > a span {
	text-decoration: none;
}
.menu-drawer__navigation .menu-drawer__menu > li:last-child a{
	background: green;
	border-radius: 40px;
}

Is it possible to make the text white? I think white text with green background would stand out better. Thanks so much!

Hi @Justin34

Replace code above with code below

.header  .header__inline-menu .list-menu > li:last-child > a{
	background: green;
	border-radius: 40px;
	text-decoration: none !important;
	padding-left: 30px;
	padding-right: 30px;
	color: #fff!important;
}
.header  .header__inline-menu .list-menu > li:last-child > a span {
	text-decoration: none;
	color: #fff;
}
.menu-drawer__navigation .menu-drawer__menu > li:last-child a{
	background: green;
	border-radius: 40px;
	color: #fff!important;
}
1 Like

Perfect!! You know your stuff. Thank you! One last question about this. Everything is perfect on my desktop. But on mobile, the button goes all the way across the navigation. Is there anyway to make the button not as wide on the mobile navigation. Looks a little strange. Thanks so much!

Hi @Justin34

You can use code below

.header  .header__inline-menu .list-menu > li:last-child > a{
	background: green;
	border-radius: 40px;
	text-decoration: none !important;
	padding-left: 30px;
	padding-right: 30px;
	color: #fff!important;
}
.header  .header__inline-menu .list-menu > li:last-child > a span {
	text-decoration: none;
	color: #fff;
}
.menu-drawer__navigation .menu-drawer__menu > li:last-child {
	padding: 0 3.2rem;
}
.menu-drawer__navigation .menu-drawer__menu > li:last-child a{
	background: green;
	border-radius: 40px;
	color: #fff!important;
	justify-content: center;
}

2 Likes

Worked perfectly :grinning_face_with_smiling_eyes: Thanks so much!

Hello! I’m looking to do the exact same thing but with a drop-down menu, instead of a link. This solution worked when I have a single link in the last position in the menu, but not when there is a drop-down. Can you please let me know how to fix this?

https://rejuvenateresources.com/

I’d like the “SHOP” drop-down menu to look like a button (orange background, #FD9D15)

Thank you!

Hi @loreen_sawatzky ,

May I suggest to update code these steps:

  1. Go to Store Online-> theme → edit code
    2.Assets/base.css
  2. add code below to end of file
#menu-drawer .menu-drawer__menu > li:last-child summary.menu-drawer__menu-item{
    background: #FD9D15;
    border-radius: 30px;
}
.list-menu.list-menu--inline > li:last-child summary.header__menu-item {
    background: #FD9D15;
    border-radius: 30px;
    padding-right: 4rem;
    padding-left: 3rem;
}
.list-menu.list-menu--inline > li:last-child summary.header__menu-item .icon-caret {
    right: 2rem;
}

Thank you!! I ended up pasting the code into the Custom CSS section on the homepage header block and it was perfect! THANK YOU!

is there a way to make the button stay all the way on the right side of the screen instead of it just making the button where the last “in-line” menu item is?

Hi @tshark ,

Could you share store url and protect pass? I will help to check it.

1 Like

my store is www.sharkeysmobiledetailing.com

Its public so no protect pass

Hi @tshark ,

May I suggest to update code these steps:

  1. Go to Store Online-> theme → edit code
  2. Assets/base.css
  3. Add code below to end of file
body .header__inline-menu {
	display: block;
}
@media screen and (min-width: 990px) {
	body .header--middle-left {
		grid-template-columns: auto 1fr;
	}
	body .header__inline-menu .list-menu--inline{
		min-width: 100%;
	}
	body .header__inline-menu .list-menu--inline > li:last-child {
		margin-left: auto;
	}
}
@media screen and (max-width: 989px) {
	body .header__inline-menu .list-menu--inline > li {
		display: none;
	}
	body .header__inline-menu .list-menu--inline > li:last-child  {
		display: block;
	}
	body .header {
			grid-template-areas: "left-icons heading navigation icons";
			grid-template-columns: 1fr 2fr;
	}
	body #menu-drawer .menu-drawer__navigation .menu-drawer__menu > li:last-child {
		display: none;
	}
}

Great Job! Can you make the “book now” button style a white border oval button, just like the view our service area button looks like? Aslo can you make the book now button not show up in the header on mobile devices? like just have it in the normal menu

Hi @tshark ,

You can replace code above with code below:

body .header__inline-menu {
    display: block;
}
body .header__inline-menu .list-menu--inline>li:last-child > a span,
body .header__inline-menu .list-menu--inline>li:last-child > a{
    text-decoration: none;
    position: relative;
}
body .header__inline-menu .list-menu--inline>li:last-child > a:after {
    content: "";
    position: absolute;
    top: var(--buttons-border-width);
    right: var(--buttons-border-width);
    bottom: var(--buttons-border-width);
    left: var(--buttons-border-width);
    z-index: 1;
    border-radius: var(--buttons-radius);
    box-shadow: rgb(255, 255, 255) 0px 0px 0px 1.3px, rgba(0, 0, 0, 0) 0px 0px 0px 1px;
}
body .header__inline-menu .list-menu--inline>li:last-child > a:hover:after{
    box-shadow: rgb(255, 255, 255) 0px 0px 0px 2.3px, rgba(0, 0, 0, 0) 0px 0px 0px 2px;
}
@media screen and (min-width: 990px) {
    body .header--middle-left {
        grid-template-columns: auto 1fr;
    }

    body .header__inline-menu .list-menu--inline {
        min-width: 100%;
    }

    body .header__inline-menu .list-menu--inline>li:last-child {
        margin-left: auto;
    }
}

@media screen and (max-width: 989px) {
    body .header__inline-menu .list-menu--inline>li {
        display: none;
    }

    body .header__inline-menu .list-menu--inline>li:last-child {
        display: block;
    }

    body .header {
        grid-template-areas: "left-icons heading navigation icons";
        grid-template-columns: 1fr 2fr;
    }

    body #menu-drawer .menu-drawer__navigation .menu-drawer__menu>li:last-child {
        display: none;
    }
}
1 Like

Hello there!
i’m trying to do the same thing but i’d like to have this specific button on the right.

any suggestions?

Hi @julienamoseeds ,

Could you share your url, protect password and which style button that you would like to show? We will help to check it.

Hi EBOOST!

here is the URL: https://jyc9965w3qdrjqre-71566098721.shopifypreview.com

(no pwd required)
I want the “contact“ button in the header just next to the magnifying glass.
i’ve added “margin-left: 130px;“ but i know it’s not correct
i’ve tried a align-content… but didn’t work

i also need a hover effect
any hint?

Hi,

Maybe I suggest you add code below to end of file Assets/base.css

@media(min-width: 990px){
	body .header.header--middle-left {
		grid-template-columns: auto 2fr auto;
	}
	body .header--middle-left .header__inline-menu {
		margin: 0;
	}
	body .header .header__inline-menu .list-menu > li:last-child {
		margin-left: auto;
	}
	body .header .header__inline-menu .list-menu > li:last-child > a {
		margin-left: 0;
	}
	body .header .header__inline-menu .list-menu > li:last-child > a:hover {
		background: #e4572e;
	}
	body .header--middle-left  .header__inline-menu  .list-menu--inline {
		width: 100%;
	}
}

1 Like