how to make color change to white when hovering over button

Bazla

The text color only changes when I hover over the text. I want the text color to change to white when I hover over the button.

Can anyone see where I am going wrong, please?

#callbtn {
  border: 1px solid #507487;
  background-color: white;
  padding: 10px;
  font-size: 20px;
  color: #507487;
  border-radius: 10px;
  font-weight: bold;
  text-align: center;
}

#callbtn:hover {
  background-color: orange;
  color: white;
  border: 1px solid orange;
  cursor: pointer;
}

#callbtn a {
  color: #507487;
}

#callbtn a:hover {
  color: white;
}

@media screen and (max-width: 768px) {
  #callbtn {
    font-size: 14px;
  }
}

#callbtn i {
  padding-right: 10px;
}
<p class="m-2 text-center" id="callbtn"><i class="fas fa-phone-volume"></i><a href="tel:+441225xxxxxx">Call</a></p>

BunkerBilly

callbtn:hover triggering when the button is hovered over, and a:hover is triggering when the link is hovered over. Which is why this is happening, you are hovering over the button but not setting the colour of the link. The CSS below will set a style to the child link when button is hovered over.

#callbtn:hover a {
  color: white;
}

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Trying to make nav text change color when hovering over the button and not only the text

From Dev

CSS change color of span when hovering over button

From Dev

Tkinter Hovering over Button -> Color change

From Dev

Change image color when hovering over li

From Dev

change color of both text and link when hovering over element

From Dev

Change combobox item back color when hovering over it

From Dev

Change Color of Icon When Hovering Over Adjacent Text With jQuery

From Dev

Change BODY background color when hovering over a table cell

From Dev

How can i make a custom made textbox appear when hovering over a button in wpf

From Java

Change color of Button when Mouse is over

From Dev

How to display a button over a picture only when hovering it?

From Dev

How to make a tolltip appear only when hovering over text?

From Dev

How to change css of one class when hovering over another?

From Dev

Why does the <li> element not change color and width when I hover the mouse over it after hovering over the image?

From Dev

Change button color to white when changing windows theme to high contrast

From Dev

How to change the background color of a ListBox Item when hovering?

From Dev

Highcharts: how to change line color when hovering a scatterplot series

From Dev

How to change text color (and background) on nav bar links when hovering?

From Dev

How to change color on every element in div when hovering?

From Dev

How to change text color (and background) on nav bar links when hovering?

From Dev

How to change the background color of a ListBox Item when hovering?

From Dev

How to change color of text when hovering on anything on a card?

From Dev

Make Button NOT change title color when pressed

From Dev

Selecting color when hovering over navbar

From Dev

Selecting color when hovering over navbar

From Dev

How to make the background of a button change on mouse over

From Dev

gmaps4rails change marker color when hovering over item in sidebar

From Dev

gmaps4rails change marker color when hovering over item in sidebar

From Dev

how to make a image button that change the image when mouse over button WPF?

Related Related

  1. 1

    Trying to make nav text change color when hovering over the button and not only the text

  2. 2

    CSS change color of span when hovering over button

  3. 3

    Tkinter Hovering over Button -> Color change

  4. 4

    Change image color when hovering over li

  5. 5

    change color of both text and link when hovering over element

  6. 6

    Change combobox item back color when hovering over it

  7. 7

    Change Color of Icon When Hovering Over Adjacent Text With jQuery

  8. 8

    Change BODY background color when hovering over a table cell

  9. 9

    How can i make a custom made textbox appear when hovering over a button in wpf

  10. 10

    Change color of Button when Mouse is over

  11. 11

    How to display a button over a picture only when hovering it?

  12. 12

    How to make a tolltip appear only when hovering over text?

  13. 13

    How to change css of one class when hovering over another?

  14. 14

    Why does the <li> element not change color and width when I hover the mouse over it after hovering over the image?

  15. 15

    Change button color to white when changing windows theme to high contrast

  16. 16

    How to change the background color of a ListBox Item when hovering?

  17. 17

    Highcharts: how to change line color when hovering a scatterplot series

  18. 18

    How to change text color (and background) on nav bar links when hovering?

  19. 19

    How to change color on every element in div when hovering?

  20. 20

    How to change text color (and background) on nav bar links when hovering?

  21. 21

    How to change the background color of a ListBox Item when hovering?

  22. 22

    How to change color of text when hovering on anything on a card?

  23. 23

    Make Button NOT change title color when pressed

  24. 24

    Selecting color when hovering over navbar

  25. 25

    Selecting color when hovering over navbar

  26. 26

    How to make the background of a button change on mouse over

  27. 27

    gmaps4rails change marker color when hovering over item in sidebar

  28. 28

    gmaps4rails change marker color when hovering over item in sidebar

  29. 29

    how to make a image button that change the image when mouse over button WPF?

HotTag

Archive