button does not work in Firefox within a Wordpress theme [closed]

0

I'm creating a button inside a Wordpress theme, but the same does not work in Firefox, already in Chrome and IE works without any problems.

My button:

<button class="faleconosco"><a class="texto_faleconosco" href="https://www.google.com.br">GOOGLE</a></button>
    
asked by anonymous 14.08.2015 / 02:19

1 answer

1

In my understanding, a <button> is rendarizado and aje very different than a <a> , being this a link. It looks like IE and Chrome are interpreting your HTML in a way that ends up giving the desired result. Obviously Firefox does not interpret the same way.

If you want a link that looks like a <button> in the browser, it's best not to use <button> , and simply use a CSS to change the appearance of <a> . Something like this:

HTML

<a class="button" href="https://www.google.com.br">GOOGLE</a>

CSS

a.button {
    -webkit-appearance: button;
    -moz-appearance: button;
    appearance: button;

    text-decoration: none;
    color: initial;
}

Inspired that answer in SOen     

14.08.2015 / 02:29