Results 1 to 2 of 2

Thread: Restricting Filter To Certain Images

  1. #1
    Join Date
    May 2005
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Restricting Filter To Certain Images

    I have a code for making an image's colors invert on mouseover:
    <STYLE TYPE="text/css">
    IMG{
    filter: No Filter;
    }
    A:LINK IMG{ filter: No Filter }
    A:HOVER IMG{ filter: Invert }
    </STYLE>

    I would like to make that where it only works with the images that I choose for it to...Is this possible? Thank You.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Code:
    <STYLE TYPE="text/css"> 
    IMG{ 
    filter: No Filter; 
    }
    A:LINK IMG{ filter: No Filter } 
    A:HOVER IMG.chango{ filter: Invert }
    </STYLE>
    Then only the second image below will change.
    HTML Code:
    <a href="#"><img src="photo1.jpg"></a>
    <a href="#"><img class="chango" src="photo2.jpg"></a>
    You can use almost any word for chango. All you really need in the style section is:

    Code:
    <STYLE TYPE="text/css"> 
    A:HOVER IMG.chango{ filter: Invert }
    </STYLE>
    Last edited by jscheuer1; 05-15-2005 at 04:00 PM.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

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