I am trying to a button to the main menu of my website, but I am having issues. The box for the button is vertically filling the entire menu when I only want it to be immediately surrounding the text. Please find my CSS code below. What do I need to do to fix this issue?
Hi,
I am trying to a button to the main menu of my website, but I am having issues. The box for the button is vertically filling the entire menu when I only want it to be immediately surrounding the text. Please find my CSS code below. What do I need to do to fix this issue?
.yourclass {
border:1px solid #ffffff;
background-color:#5eabd6;
border-radius:5px;
}
.yourclass a {
color:
#fff;
}
.yourclass:hover{
opacity:0.7;
background-color:#fff;
border:1px solid #5eabd6;
}
Hello Kyle, thanks for purchasing Thefox!
You need to target the "a" element and not the class directly.
Then make sure to adjust the padding / margin and it should be ok.
If you still have difficulty with the button please send us a link to your site.
Do not hesitate to contact us if you have more questions.
Have a nice day!
Regards.
---------------------
Hosting we recommend ( Free SSL and CDN included in all plan ).
Speed up your site with Autoptimize
Test your site with GTmetrix and fix the issue to make it faster
How to Update your Theme