Home > database >  Remove ugly white shadow from button when hovered
Remove ugly white shadow from button when hovered

Time:05-05

Whenever I hover over my button that I created, it has a white which looks ugly in the transition. I need help to remove this.

The button has two different blocks of css: one for the button itself and other block is .morb_button for the same button on a different webpage.

button {
      background-color: #961a75;
      border-radius: 5px;
      color: white;
      padding: 15px 32px;
      text-align: center;
      display: inline-block;
      font-size: 25px;
      border:none;
      box-shadow: 1px 1px 3px #323d73;
      cursor:pointer;
      transition-duration: 0.2s;
      font-family: Gill Sans
}

button:hover {
      background-color: #cc5caf; 
      color: white;
      box-shadow: 0px 0px 0px
}

.morb_button {
      background-color:#022b27;
      box-shadow: 2px 2px 3px #4a0404
}

.morb_button:hover {
      background-color: #03524a;
}

CodePudding user response:

You have used the property box-shadow twice in the snippet. Remove either of them to fix this.

box-shadow: 0px 0px 0px; 
box-shadow: 2px 2px 3px #4a0404;

CodePudding user response:

box-shadow: 2px 2px 3px #4a0404 Remove this

  • Related