79451991

Date: 2025-02-19 16:02:20
Score: 1
Natty:
Report link

You need to wrap the button inside an tag to make it a clickable link. Also, your CSS has an incorrect @import inside the background-image property—remove that part. Here’s the corrected code:

<html>
  <head>
    <title>Button Link</title>
    <style>
      .butn {
        background-image: url("https://static1.squarespace.com/static/54da7941e4b0e25dc3648a4f/t/59640885b3db2b282c21c56e/1499728005971/zero_state%40300x-8.png");
        width: 555px;
        height: 170px;
        display: block;
      }

      .butn:active {
        background-image: url('https://static1.squarespace.com/static/54da7941e4b0e25dc3648a4f/t/5964090b6b8f5bf77b28504f/1499728139538/hover_state%40300x-8.png');
      }
    </style>
  </head>
  <body>
    <a href="https://example.com">
      <div class="butn"></div>
    </a>
  </body>
</html>
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @import
  • Low reputation (1):
Posted by: Saad