Hi! I used Chat GPT to generate some css and html to create a button for me to link to a website, but it has some strange behavior that I'd like to get rid of. Here's the current css:
.button { background-color: #083D20; border: none; color: white; padding: 10px 20px; text-align: center; text-decoration: none; display: block; /* Change display to block to center horizontally */ margin: 0 auto; /* Set margin to auto to center horizontally */ font-size: 16px; border-radius: 5px; cursor: pointer; box-sizing: border-box; margin-bottom: 16px; /* Add some margin at the bottom */ } .button:hover { background-color: #AC923C; color: black; }
And here's the HTML:
<p></p><a href="https://www.cityofsouthlake.com/DocumentCenter/View/36992/Employee-Drug-Testing-Policy" class="button" target="_blank">City of Southlake Drug-Free Workplace Policy</a>
As for the strange behavior, when hovering over it, a non-uniform border (thicker on top) around it is highlighted, but is not clickable. Currently, in the on-hover image below, you must click within the green area to be taken to the link. I want the whole button to function as a singular button so that no matter where you hover your mouse, the whole thing changes color, and no matter where you click, you're taken to the relevant link. Any thoughts?
Non-hover:
On-hover: