- This topic has 15 replies, 3 voices, and was last updated 4 years ago by David.
-
AuthorPosts
-
April 14, 2020 at 3:22 am #1238353eden
Hello I would like to add button to header and I dont know how to do it.
For example I would like to make a button similar to this https://imgur.com/a/ezNflzXApril 14, 2020 at 6:59 am #1238546DavidStaffCustomer SupportHi there,
this document explains how to ‘style’ Menu items to look like buttons:
https://docs.generatepress.com/article/adding-buttons-navigation/
April 14, 2020 at 10:25 am #1239010edenOk so I have made this button But I need some help modifying it.
this s my code@media (min-width:769px) { .main-navigation .main-nav ul li.nav-button a { background-color: ff7b00; border: 1px solid #FF7B00; border-radius:100%; color: #fff; box-shadow: -0px 3px 3px 5px #DB6600; } } }
When I am hover the button I can see the border color that is not changing to be same as the button background color, I dont know how to fix it
In this link you can check the screenshot https://imgur.com/a/4Dro7uv
Thank you
April 14, 2020 at 5:05 pm #1239328DavidStaffCustomer SupportTry adding this CSS:
.main-navigation .main-nav ul li.nav-button:hover > a { border-color: #f26d00; }
April 15, 2020 at 12:47 am #1239543edenThank you
Also How can I put button in mobile header instead of phone number in the photo ? https://imgur.com/a/wpSIqL7April 15, 2020 at 3:10 am #1239700DavidStaffCustomer SupportI assume you used a Hook to add your phone number – just change the HTML to display as a button as explained here:
April 15, 2020 at 8:08 am #1240242edenYes I have deleted the phone number HTML But I dont know how to make the button appear there,
Please help meApril 15, 2020 at 8:28 am #1240289DavidStaffCustomer SupportIn the same way you added the HTML for the phone number you just need to add the HTML for the button – in the documents i provided the example is this:
<a class="button" href="https://google.com">Button to Google</a>
If you want the button to be a phone number then it would look like:
<a class="button" href="tel:123-456-7890">123-456-7890</a>
April 15, 2020 at 12:41 pm #1240632edenYes but I dont know what is the class of the button, I am not quite good in coding
I want the button you see in screenshot to appear in mobile instead of the phone number
How I do it ?April 15, 2020 at 8:36 pm #1240920TomLead DeveloperLead DeveloperHi there,
In your Hook Element, do this:
<a class="button phone-button" href="tel:123-456-7890">123-456-7890</a>
Then add this CSS:
.button.phone-button { background-color: #ff7b00; border: 1px solid #FF7B00; border-radius: 100%; color: #fff; box-shadow: 0px 3px 3px 5px #DB6600; }
Let me know if this helps or not 🙂
April 16, 2020 at 1:56 am #1241134edenHi its strange
When I edit it via customizer in my desktop I can see it for responsive devices
But when I enter from a mobile device I cant see the button
Can you please check ?
https://edensharabi.co.il/mobile/April 16, 2020 at 5:47 am #1241324DavidStaffCustomer SupportYes it displays on my phone ok – you may need to clear browser caches.
But the phone number is too large and overlapping the logo and your menu toggle is also overlapping the logo – add this CSS to fix that:
@media (max-width: 768px) { .main-navigation:not(.slideout-navigation) .inside-navigation { flex-direction: row-reverse; } .site-logo { margin-left: 0 !important; } .button.phone-button { font-size: 14px; } #mobile-header .menu-toggle { margin-left: auto; } }
April 16, 2020 at 7:14 am #1241413edenI need to replace the elements here in mobile header please check the screenshot
April 16, 2020 at 7:18 am #1241424DavidStaffCustomer SupportI edited the code above
April 16, 2020 at 7:25 am #1241436edenPerfect Thank you!
-
AuthorPosts
- You must be logged in to reply to this topic.