Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

How to add a link to buttonblock with tagname button

  • My link color is the same as the background color of my buttons. When I add a button with tagname ‘a’ and set the color to white, the textcolor in the button is overridden by the set linkcolor and invisible. When I change the tagname to button the textcolor is OK, but using the button tagname there is no option to set a link (which seem a bit odd to me).
    As far as a can see there is an important difference in the css selector generated by Generateblocks. The ‘old’ button has a selector like ‘a.gb-button-ea6c6eef‘ which takes precedence over ‘.inside-article a‘. The new button has a selector like .gb-text-a3fefade which has no precedence.
    Demonstrated here:https://fysiodynamics.nl/pijn-aan-voorkant-van-je-onderbeen/

  • Hi there,

    Remove the link color set under Customize > Colors > Content > Link and set the link color under Customize > Colors > Body > Link instead. That should resolve the issue.

  • Thanks for the answer. This solves my initial problem, but I’m still wondering why it is not possible to add a link, when using the tagname ‘button’.

  • <button> tag in HTML usually doesn’t have a link and is used to trigger JS or a function, while the <a> tag is for links.

    Check this for more info:
    https://www.w3schools.com/tags/tag_button.asp

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.