Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jan 2005
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Help with simple rollover script

    I'm pretty new with javascript and I was hoping someone could help me out here. I'm using probably the most basic script there is for a rollover effect and I have it working just fine. It is;

    <img src="picture.jpg" name="picture" onMouseOver="picture.src='pic1.jpg';" onMouseOut="picture.src='picture.jpg';"

    However my problem is this. When I rollover an image a new image appears but it makes the image itself move, and the others around it. http://www.irule.co.nr is my page to see what I mean. Roll the mouse over the buttons under articles. How can I avoid it doing that? Any help would be greatly appreciated.

    Thanks

    Joe

  • #2
    Senior Coder
    Join Date
    Nov 2003
    Location
    Minneapolis, MN
    Posts
    2,879
    Thanks
    2
    Thanked 65 Times in 56 Posts
    At first glance I would say the images aren't the same size, and since you're using a table as your layout method, it's resizing to make room for the new images.

    You can fix this for now by assigning implicit widths and heights to the images, or just making sure they're the same size.

  • #3
    New to the CF scene
    Join Date
    Jan 2005
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thank You

    Thanks rmedek for replying to my post; adding the height and width to the images fixed my problem. I appreciate your help alot.

    Joe


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •