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
    Regular Coder
    Join Date
    Sep 2011
    Posts
    264
    Thanks
    49
    Thanked 1 Time in 1 Post

    What file is controlling this swap image behaviour?

    Hi. I've been asked to perform a website update to a website I did not build, and the front page has images that swap on mouse over.

    This looks to be controlled by the CSS classes of the image and the hover image, but I can't see what file controls the behaviour; either CSS or JS.

    The main image has a CSS class of "insert_image_name_here" and the hover image has a CSS class of "insert_image_name_herehover".

    The reason I ask is because I need to add another image, and I need this image to swap on mouse over. If I duplicate the naming convention but give the new image a completely new base name for the CSS class, the swap behaviour does not occur.

    I'm figuring there is a file I may need to add the base name to so that it is included in whatever controls the image swap, but I can't find this file.

    Have you encountered a swap image behaviour based on CSS image class before? There may be a standard library the original designer used.

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,668
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Hello SRD75,
    There is no file controlling that, no js anyway.
    The CSS that's hiding the hovered image is here -
    Code:
    .module-fun a .f1hover, .module-food a .foodhover, .module_contact a .contacthover, .module_pic a .pichover {
        display: none;
    }
    Those images with the class .pichover are not displayed until the mouse is over the image, at which point this bit of CSS makes them appear -
    Code:
    .module-fun a:hover .f1hover,.module-food a:hover .foodhover,.module_contact a:hover .contacthover,.module_pic a:hover .pichover{display:inline}
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #3
    Regular Coder
    Join Date
    Sep 2011
    Posts
    264
    Thanks
    49
    Thanked 1 Time in 1 Post
    Hello Excavator

    You've saved me from a world of hurt. I appreciate it. You've allowed me to complete my job.

    Thanks again.

    SRD75


  •  

    Tags for this Thread

    Posting Permissions

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