首页 > 解决方案 > HTML button not working on click but css works fine

问题描述

You read it right.. My html button is functional but sometimes it doesn't redirects to the link.

My button code is

<a href="gallery/"><button style="text-align:center;border:black 1px solid; background-color:black;width:1px;height:1px;border-radius:100px;"><h5 style="color:white;font-family:courier;">Oil Paintings</h5><img src="images/oilPainting.jpeg" width="300px" style="border-radius:1000px;"/></button></a><

I don't know whether this is a button problem or the problem is in the anchor tag somewhere.

To check the working, I added some css the enlarges the button on click. but when I click the button, it just enlarges and doesn't redirects. Please Help..

标签: htmlcssredirectbutton

解决方案


推荐阅读