Bewildered Bewildered - 1 year ago 60
HTML Question

Any way to get a text area to follow mouse?

My first website is working ok, but I have an idea I don't know how to accomplish. Some pages have a video player that has buttons to select videos. When the mouse hovers over a button, the navigation menu is replaced with a popup text area that describes the video.

I would like the popup text to appear a few lines above the button over which the mouse hovers, so the viewer's eyes don't have to move back and forth. I've looked, but haven't been found anything to indicate how to do this. The closest thing I've seen is using a

title property to create a mouseover tool tip. Perhaps you can point me in the right direction?

Answer Source

Try this :




Final code :

<!DOCTYPE html>
<html lang="en">
        .moveTxt {
            position: relative;
            background-color: yellow;
            display: inline-block;
            border: 1px solid red;
        <div class="moveTxt">Text</div>
        <script src=""></script>



Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download