Site logo

Archived topic

Rounded Corner Button in Navigation Bar

16 replies · Started by Sumit on May 15, 2018

Viewing posts 1–15 of 17

http://i.imgur.com/ZeQtls2.png

I want to add a button like this in my website's navigation bar.

I followed this ticket

https://generatepress.com/forums/topic/round-border-around-a-menu-button/

But I am unable to make it on my website.

I am providing the link to my website.

I also want to know where I can get update on my older tickets, I forgot to select "Notify me of follow-up replies via email" now older tickets are no where to be found.

I ended up fixing all previous issues myself, hopefully I receive update on this one.

it looks like this
http://prntscr.com/jic5r5

I am using this code in additional CSS under customize.

@media (min-width:769px) {
.main-navigation .main-nav ul li.nav-button a {
background-color: #ffffff;
border: 2px solid #000000;
border-radius: 5px;
color: #000000;
}
}

http://prntscr.com/jic6ex

Hi Sumit,

try this CSS:

@media (min-width:769px) {
    .main-navigation .main-nav ul li.nav-button a {
        background-color: #ffffff;
        border: 2px solid #000000;
        border-radius: 30px;
        color: #000000;
        line-height: 35px;
    }
}

its almost there, just need to align it middle in the header. I changed line-height to 25.

Please check this snapshot http://prntscr.com/jif4wo

also it possible to show similar button on tablet and mobile as well?

thanks, it worked, http://prntscr.com/jilnmk

is possible to make the button little bigger horizontally.

can you also provide css button and text hover state colors?

Thanks
Sumit

Hi Sumit,

you can add these properties to the CSS:

padding-left: 15px;
padding-right: 15px;

Adjust the PX accordingly

Thanks, we can't add css for hover effect?

Hi Sumit, you just need to add CSS to include the hover pseudo class like so:

.main-navigation .main-nav ul li.nav-button a:hover {
    styles go here.
}

Thanks David, this is perfect.

now if I could do the same for mobile and tablet view as well it would be gold :)

Thanks
Sumit

Hi Sumit, just remove the @media (min-width:769px) { and the last } from the CSS

Then try adding a limit to the width for the mobile:

@media (min-width:320px) {
    .main-navigation .main-nav ul li.nav-button a {
        max-width: 180px;
    }
}
This archived topic is closed to new replies.