Loading

Customizing color for a single Support Nav button.

It is common practice to make a Donate button stand out by giving it a different color on a web site.  Is there an easy way to customize the color on just one of the supporter nav buttons?

Official response from Jesse Haff

The supporter nav buttons are designed for this purpose, as they usually stand out more than anything else on the site. However, if you have a custom theme, you can edit either layout.html or _nav.html and use CSS to float a donation link or button to the right of your nav. You can then use CSS to style it however you would like.

To change the color of just one button, change the div which surrounds it from “submit_link_huge” to something unique like “donate_button_red” and then copy the following code to your theme.scss file, changing the color hex code to whatever color you want (this will make it red): 

.donate_button_red a {
@include fancy-button-structure(1.3em, 3px, 1px); 
@include fancy-button-colors(#d60101, darken(#d60101, 5), darken(#d60101, 10)); 
width: 100%;
padding-right: 0px;
padding-left: 0px;
text-align: center;
line-height: 2.4em;
&:hover { text-decoration: none; color: white; } }

How would you tag this suggestion?
Do you like this suggestion?

Showing 13 reactions


Juan Carlos Pineiro commented 2013-04-05 18:50:20 -0700 · Flag
So, I’m trying to get rid of the gradient on the button when I hover on it… I’ve deleted CSS that seems to be affiliated this, and I cannot figure out why I can’t seem to get it go away.
Alex Stevens tagged this with Helpful 2012-10-02 23:20:56 -0700
Amy Leaman commented 2012-08-19 13:27:39 -0700 · Flag
Belated follow-up: I don’t know if this needs a whole new discussion string but I’ll looking to change the background colour of only one button in the top nav. So, back to Michael’s questions – is it possible to specify if li is “donate”, then… and be able to style it separately with css?
Lilia Villa tagged this with Answered 2012-05-15 09:24:32 -0700
Josh Stuart tagged this with Helpful 2012-04-17 17:25:28 -0700
Jesse Haff commented 2012-02-05 16:12:03 -0800 · Flag
To change the color of just one button, change the div which surrounds it from “submit_link_huge” to something unique like “donate_button_red” and then copy the following code to your theme.scss file, changing the color hex code to whatever color you want (this will make it red):

.donate_button_red a {
@include fancy-button-structure(1.3em, 3px, 1px);
@include fancy-button-colors(#d60101, darken(#d60101, 5), darken(#d60101, 10));
width: 100%;
padding-right: 0px;
padding-left: 0px;
text-align: center;
line-height: 2.4em;
&:hover { text-decoration: none; color: white; } }
Michael Kahlow commented 2012-02-05 08:46:53 -0800 · Flag
I’ve asked a similar question and am also looking for an answer to this. It’s not about changing all the buttons, it’s about changing only one of them.

Putting the button in the supporter nav is not terribly useful. We’ve got a lot of people who will not want to “sign in” and give information. We want to get them to the donate page quickly and clearly, with a minimum number of clicks.

It would be useful if we could get a piece of code that started with

(if the button is = ‘donate’ or some other slug, then)
(here’s the code to change that button)

If you can include the code to make that button sit on the right side of the top nav instead of put with all of the others, that would be even better.
Adriel Hampton commented 2011-11-14 12:42:55 -0800 · Flag
In the theme.scss file, you can edit the buttons using this code:

.submit-button-huge, .submit_link_huge a {
@include fancy-button-structure(1.3em, 3px, 1px);
@include fancy-button-colors($theme_color_1, darken($theme_color_1, 5), darken($theme_color_1, 10));
width: 100%;
padding-right: 0px;
padding-left: 0px;
text-align: center;
line-height: 2.4em;
&:hover { text-decoration: none; color: white; } }
Peter Brown commented 2011-11-14 11:23:08 -0800 · Flag
how can we either change the font on the button or, even better, change the button itself? They look amateurish.
Donald Darnell tagged this with Helpful 2011-10-27 08:35:58 -0700
Jesse Haff responded 2011-10-27 08:26:11 -0700

It is common practice to make a Donate button stand out by giving it a different color on a web site.  Is there an easy way to customize the color on just one of the supporter nav buttons?