WordPress.org

Forums

How do I create a mouseover (rollover)? (6 posts)

  1. livanova
    Member
    Posted 2 years ago #

    Hello,

    I am trying to create a mouseover on a page of my blog/website. I've tried lots of different code, and none of them work, including the code currently used. Can someone please check this out and let me know if there's something I can change to make this work? The link works, but when I mouseover the image, the new image (with text) doesn't appear.

    http://www.lauraivanova.com/new-home/

    Here is the code without my image links subbed in:
    <img src=" URL_IMG-1 " onmouseover="this.src=' URL_IMG-2 '" onmouseout="this.src=' URL_IMG-1 '" />

    Any help would be so appreciated! I am a code/website/html novice. Thank you!!!

  2. livanova
    Member
    Posted 2 years ago #

    ok, I don't know how to paste code, but here is the website where I found my code:
    http://saypoint.blogspot.com/2011/04/creat-simple-image-rollover-html-code.html

    I used the HTML code, not the CSS with HTML

  3. livanova
    Member
    Posted 2 years ago #

    Maybe it's worth noting that when I view this page in the "visual" mode of the editor, the mouseover works!

  4. re posting code: http://codex.wordpress.org/Forum_Welcome#Posting_Code

    have you tried using absolute image urls?

  5. livanova
    Member
    Posted 2 years ago #

    Thanks so much for your response. To be honest, I'm not sure what an absolute image URL is. I tried googling it and it's not really clear to me. I uploaded my images directly to my website:
    http://www.lauraivanova.com/images/icon1.jpg
    http://www.lauraivanova.com/images/icon2.jpg

    I tried using these URLs in the code on my page (pasted below as well), and it still does not work. I'm so stumped. Any help would be so much appreciated!

    Thanks, Laura

  6. livanova
    Member
    Posted 2 years ago #

    <!-- image rollover code by http://saypoint.blogspot.com -->
    <a href="#"><img src=" URL_IMG-1 " onmouseover="this.src=' URL_IMG-2 '" onmouseout="this.src=' URL_IMG-1 '"  /></a>

Topic Closed

This topic has been closed to new replies.

About this Topic