- This topic has 6 replies, 3 voices, and was last updated 5 years, 3 months ago by
Ying.
-
AuthorPosts
-
February 9, 2019 at 6:21 am #805748
Karlis
Hi guys,
Is it possible to create a specific button in whole web ?
I mean shape, color and transparent button.
RegardsFebruary 9, 2019 at 9:29 am #806027Tom
Lead DeveloperLead DeveloperHi there,
Here’s something I like to do:
button.ghost, html input[type="button"].ghost, input[type="reset"].ghost, input[type="submit"].ghost, a.button.ghost, a.button.ghost:visited, a.wp-block-button__link.ghost:not(.has-background) { background: transparent; color: inherit; border-color: inherit; } button.ghost:hover, html input[type="button"].ghost:hover, input[type="reset"].ghost:hover, input[type="submit"].ghost:hover, a.button.ghost:hover, a.wp-block-button__link.ghost:not(.has-background):hover { background: transparent; color: #1e73be; }This allows you to use this markup when creating your buttons:
<a class="button ghost" href="YOUR LINK">My button</a>If you don’t want to have to add the
ghostclass to the button, you can do this:button, html input[type="button"], input[type="reset"], input[type="submit"], a.button, a.button:visited, a.wp-block-button__link:not(.has-background) { background: transparent; color: inherit; border-color: inherit; } button:hover, html input[type="button"]:hover, input[type="reset"]:hover, input[type="submit"]:hover, a.button:hover, a.wp-block-button__link:not(.has-background):hover { background: transparent; color: #1e73be; }February 10, 2019 at 6:25 am #806536Karlis
Hi, Tom!
Thanks for an advice! It really works.February 10, 2019 at 8:43 am #806717Tom
Lead DeveloperLead DeveloperGlad I could help! 🙂
January 21, 2021 at 12:38 pm #1628387John Austria
Hi,
Trying to use this, but I can’t make the size of the button bigger. Also, how do I change the font size?
JG
January 21, 2021 at 1:13 pm #1628434Leo
StaffCustomer SupportCan you open a new topic for your question?
Thanks 🙂
January 21, 2021 at 1:17 pm #1628441Ying
StaffCustomer SupportHi John,
Generally you can add some padding to the button link
awith CSS:padding: 20px 10px;to make it bigger ,try adjust the numbers.and CSS:
font-size: 30px;to the linka.If you are not sure where to add the CSS, any chance you can link us to the site in question? You can use the private information field.
Let me know 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.