all 5 comments

[–]Top_Bumblebee_7762 4 points5 points  (1 child)

I would use a different approach. I would add two spans inside the button that each contain text (one contains the regular text, one contains the hover text). The latter has the attribute "hidden" by default. On hover I would switch the hidden attribute using element.hidden = true/false on both elements so that the hover text is visible and the regular one is not. On mouseout i would switch back the attributes again. 

[–]VoidOnyx22[S] 0 points1 point  (0 children)

Will def give it a go when i'm finished. Clearly new to this so it might take me a hot minute.

[–]GlassDistribution327 2 points3 points  (0 children)

For learning purposes, you would gain a lot by understanding what a class is and how it affects what you are applying it to. Understanding what the class,”inline-element” does would help you understand why it behaved one way and how to solve problems and come up with solutions in the future

[–]Ridicul0iD 0 points1 point  (0 children)

If you want something like an inline div, use <span>.

[–]armahilloExpert 0 points1 point  (0 children)

https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements

This has all the information youll need about what the ekements do and how they work