- This topic has 15 replies, 6 voices, and was last updated 8 years, 11 months ago by
Tom.
-
AuthorPosts
-
July 4, 2016 at 6:20 am #206423
Eivind
Hi,
How can I get buttons similar to the “Add-ons – Install – Demo” on GeneratePress home page?
I just get some “boring” grey buttons when I try...Eivind
July 4, 2016 at 8:24 am #206438Roberto Enrique
Easy, create custom classes for your custom buttons ๐
If you want exactly the same Look as the buttons you see on this site you can add this to your css:/*FOR THE TRANSPARENT BUTTONS*/ .button.transparent { background-color: transparent; border: 2px solid #fff; border-radius: 5px; outline: 0 none; } .button.transparent:active, .button.transparent:hover { background-color: #fff; color: #222; } /*GREEN BUTTONS*/ .button.green { background-color: #5ea337; border: 2px solid transparent; border-radius: 5px; color: #fff; } .button.green:active, .button.green:hover{ background-color: #70b44a; color: #fff; }Then you just create your buttons adding the classes to your links like:
<a class="button transparent" href="#">I'm Transparent</a>
or
<a class="button green" href="#">I'm Greeen!</a>That should do the trick ๐
July 4, 2016 at 12:08 pm #206512Eivind
Thank you Roberto ๐
I was not sure if GeneratePress had some builtin shortcodes for this.
Will use the code you provided!…Eivind
July 4, 2016 at 12:11 pm #206517Roberto Enrique
๐
July 6, 2016 at 12:04 am #206886Tom
Lead DeveloperLead DeveloperThere’s some more button CSS here as well: https://generatepress.com/forums/topic/custom-colors-for-buttons/#post-143266
November 22, 2016 at 2:21 pm #246789Farokh
Hi,
To create link buttons, I added the CSS mentioned above, but where exactly should I add this:
<a href="#">I'm Transparent</a>November 22, 2016 at 2:53 pm #246796Farokh
OK I toyed with it and got it right ๐ , But a new question is How do I make all buttons same size, some button texts are longer than others, I want to have them in the same length.
November 22, 2016 at 7:48 pm #246858Tom
Lead DeveloperLead DeveloperButtons will adapt to the width of their text.
You can add a width to the button class if you like:
.button.my-button-class { width:150px; }November 23, 2016 at 11:46 am #247046Farokh
๐
ThanksNovember 23, 2016 at 2:47 pm #247101Farokh
Hi Tom,
How can I add like borders (or button borders) to my items on the main menu? Sign Up & Log In, in particular.
November 23, 2016 at 10:57 pm #247162Tom
Lead DeveloperLead DeveloperJanuary 13, 2017 at 5:49 am #263722Daniel
Great post ๐
April 7, 2017 at 8:28 pm #303255Sri
Hi there, this is very helpful, as I want to add button on a page header which I merge which site header.
Can you help me a bit further? What if I want to change to text/font family, size, weight, and transform for the text inside the button? What code in the CSS should I add?
Thank you very much for your helpful responses Tom and the gang. ๐
April 8, 2017 at 9:47 am #303416Tom
Lead DeveloperLead DeveloperYou would do something like this:
.button { font-weight: bold; font-size: 18px; text-transform: uppercase; }April 9, 2017 at 5:07 pm #303815Sri
Thank you very much for your response & assistance, Tom.
-
AuthorPosts
- You must be logged in to reply to this topic.