Search code examples
htmlcsspointersbuttoncursor

css3 button cursor: pointer is not working


button {
    margin: 10px;
   padding: 5px;
   background-color: lightsalmon;
   width: 20%;
   font-weight: bold;
   color: white;
   border: 1px double dodgerblue;
   border-radius: 3px;
   cursor: pointer;
  }

the above is my css code

and the below is my html code

<button type="submit" name="submit">Login</button><br><br>

when I hover the cursor over the button the cursor is not turning into pointer ,can you tell is there any mistake in the code I have given


Solution

  • That property only works on hover like this:

    button:hover {
      cursor:pointer;
    }

    Hope this helps!