SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Zealot bkflash's Avatar
    Join Date
    Apr 2006
    Posts
    148
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    CSS Image hover IE error?

    I have this hover effect for all my images, but when i try to validate it, there are errors only in IE. is there a fix for this problem?

    Heres the coding

    a img {
    filter:alpha(opacity=60);
    -moz-opacity: 0.6;
    opacity: 0.6;}

    a:hover img {
    filter:alpha(opacity=100);
    -moz-opacity: 1.0;
    opacity: 1.0;
    }


    Heres the Errors:


    URI : http://www.bkflash.com/styles.css

    * Line: 105 Context : a img

    Parse Error - opacity=60)
    * Line: 106 Context : a img

    Parse Error - -moz-opacity: 0.6;
    * Line: 109

    Parse Error - : 0.6;} a:hover img
    * Line: 110

    Parse Error - opacity=100)
    * Line: 111

    Parse error - Unrecognized : -moz-opacity: 1.0;
    * Line: 113

    Parse Error - : 1.0; }



    Anybody know a fix???

  2. #2
    The Mind's I ® silver trophy Dark Tranquility's Avatar
    Join Date
    Sep 2003
    Location
    KSA - UAE
    Posts
    9,457
    Mentioned
    8 Post(s)
    Tagged
    1 Thread(s)
    Try this

    CSS:


    Code:
        a.lopacity img {
        filter:alpha(opacity=60); 
        -moz-opacity: 0.6; 
        opacity: 0.6;}
        
        a.opacity:hover img {
        filter:alpha(opacity=100);   
        -moz-opacity: 1.0;   
        opacity: 1.0;
        }
    HTML:

    <a class="lopacity" href="xxx.php"><img src="xxx.jpg" width="xxx" height="xxx" ></a>

  3. #3
    SitePoint Zealot bkflash's Avatar
    Join Date
    Apr 2006
    Posts
    148
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ya i tried that now im getting these errors


    URI : http://www.bkflash.com/styles.css

    * Line: 145 Context : a.lopacity img

    Parse Error - opacity=60)
    * Line: 146 Context : a.lopacity img

    Parse Error - -moz-opacity: 0.6;
    * Line: 149

    Parse Error - : 0.6;} a.opacity:hover img
    * Line: 150

    Parse Error - opacity=100)
    * Line: 151

    Parse error - Unrecognized : -moz-opacity: 1.0;
    * Line: 153

    Parse Error - : 1.0; }


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
  •