Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialjose macedo
6,041 Pointshow do you make your buttons background color change orange when you hover over them???
how do you make your buttons background color change orange when you hover over them???
ive tried a couple things and it doesn't seem to work
https://w.trhou.se/7osskc34ax https://w.trhou.se/7osskc34ax https://w.trhou.se/7osskc34ax
3 Answers
Hannu Shemeikka
16,799 PointsHi,
You use pseudo-class hover.
Example
<!-- html -->
<button class="buttons">button</button>
// css
button:hover {
background-color: orange;
}
Sam Koster
3,982 PointsJust add a hover psuedo-class.
For example:
HTML
<button class="mybutton"> My Button </button>
CSS
.mybutton {
background: tomato
}
.mybutton:hover {
background: teal;
}
jose macedo
6,041 PointsI did here is my code https://w.trhou.se/7osskc34ax
Erlens Mitrofanovs
6,757 PointsI hope I got Your question right!
button:hover { background: orange; }
jose macedo
6,041 Pointsjose macedo
6,041 Pointsyes here is the link to my code https://w.trhou.se/7osskc34ax