Krystian Manthey Krystian Manthey - 30 days ago 7
CSS Question

Button doesnt link to other page

On you can see the buttons are not working and I dont know why.

Structure is like that:

<a href="" target="_blank">Click here</a>

What am I doing wrong?

Answer Source

Since the a tag is inside the button, the clickable padding area isn't part of the link. What you could do instead is invert the structure so that the a is the parent of the button.

<a href='#'>
  <button type='button'>


Tested: Edge / Firefox / Chrome