Tagged: x
-
AuthorPosts
-
January 9, 2017 at 2:30 pm #1322893
RichWarner89ParticipantHello! I want to add a button to my nav bar that looks like this one in the top right (screenshot).
Except for my specific colors of course.January 9, 2017 at 2:36 pm #1322900
RichWarner89ParticipantThis reply has been marked as private.January 9, 2017 at 10:32 pm #1323400
FriechModeratorHi There,
Thanks for writing in! Please navigate to Appearance > Menus and add your menu item that you want to look a button. Add a class x-btn on it.
If you dont see that class field on your end, please toggle the (1) Screen Options on the upper right. And check the (2) CSS classes
After that, let us know how do you want the button to look like so we can provide the tailored css.
Cheers!
January 10, 2017 at 6:52 pm #1324823
RichWarner89Participantthank you!
I would like the button to be like this (screenshot), but “pill” shaped.I would like the text and border color to be #1f79cf
then upon hover the button background to fill and be #1f79cf with the text #fff
January 11, 2017 at 12:11 am #1325084
FriechModeratorHi There,
I don’t see any of the menu item has a class x-btn? Did you add it? Since you want it as pill shape add this class as well x-btn-pill. After you added that class, you should see your menu having the pill shape border like a button. And we will just style it like the way you want.
Thanks.
January 11, 2017 at 8:59 am #1325615
RichWarner89ParticipantThis reply has been marked as private.January 11, 2017 at 10:04 am #1325725
RupokMemberHi there,
Thanks for writing back! You can add this under Custom > CSS in the Customizer.
.x-navbar .menu-item.my-btn-pill a { border: 1px solid #1abc9c; border-radius: 20px; height: 40px !important; margin: 5px auto; padding: 10px 15px !important; } .x-navbar .menu-item.my-btn-pill a span { box-shadow: none!important; }Hope this helps.
Cheers!
January 11, 2017 at 6:31 pm #1326328
RichWarner89ParticipantClose! I would like the text to be #1abc9c also.
Then I just need the adjustments for hover. I would like the button background to switch to #1abc9c and the text to switch to white #fff.
January 11, 2017 at 11:17 pm #1326755
RupokMemberHi there,
Thanks for writing back. You should be able to adjust the code with the suggested code. However here goes the complete code for your convenience :
.x-navbar .menu-item.my-btn-pill a { border: 2px solid #1abc9c; border-radius: 20px; color: #1abc9c !important; height: 40px !important; margin: 5px auto; padding: 10px 15px !important; -webkit-transition: all 0.3s ease 0s; transition: all 0.3s ease 0s; } .x-navbar .menu-item.my-btn-pill a:hover { background-color: #1abc9c; color: #fff !important; }Cheers!
January 12, 2017 at 11:48 am #1327486
RichWarner89ParticipantThat worked great! You guys rock!
One last thing, is there an extra line of code to remove the blue underline when on hover?
January 12, 2017 at 2:36 pm #1327690
JadeModeratorHi there,
Please add this code:
.my-btn-pill a:hover span { box-shadow: none !important; }Hope this helps.
January 12, 2017 at 2:38 pm #1327691
JadeModeratorHi there,
Please add this code:
.my-btn-pill a:hover span { box-shadow: none !important; }Hope this helps.
January 12, 2017 at 3:46 pm #1327793
RichWarner89ParticipantPerfect! You guys rock!
January 12, 2017 at 8:40 pm #1328171
FriechModeratorWe’re delighted to assist you with this.
Cheers!
January 27, 2017 at 1:23 am #1347378
Command23ParticipantI am attempting to create the same effect but the code is not responding correctly as Im sure I am going wrong somewhere. I would like to add a rectangle button to the navbar. Can you please assist.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1322893 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>


