2 Replies Latest reply on Sep 3, 2008 3:26 PM by Newsgroup_User

    What's wrong with this CSS code?

    Level 7
      .pre:link, .pre:visited {
      display:block;
      border:1px solid #2B1B00;
      filter:alpha(opacity=60);
      opacity:0.60;
      -moz-opacity:0.60;
      }
      .pre:hover, .pre:active {
      display:block;
      padding:0px;
      border:1px solid #C7A978;
      filter:alpha(opacity=100);
      opacity:1;
      -moz-opacity:1;
      }

      <a href="#" class="pre"><img src="image.jpg" width="50" height="50" /></a>

      Anyone see any reason why the border change occurs on hover in IE7, but the
      opacity settings do not? (100% opaque in all states in IE7, works fine in
      FF3 though).

      I also tried filter:progid:DXImageTransform.Microsoft.AlphaImageLoader,
      which didn't help.


        • 1. Re: What's wrong with this CSS code?
          Level 7
          "Mike" <mike@nospam.com> wrote in message
          news:g9m7h6$ami$1@forums.macromedia.com...
          > .pre:link, .pre:visited {
          > display:block;
          > border:1px solid #2B1B00;
          > filter:alpha(opacity=60);
          > opacity:0.60;
          > -moz-opacity:0.60;
          > }
          > .pre:hover, .pre:active {
          > display:block;
          > padding:0px;
          > border:1px solid #C7A978;
          > filter:alpha(opacity=100);
          > opacity:1;
          > -moz-opacity:1;
          > }
          >
          > <a href="#" class="pre"><img src="image.jpg" width="50" height="50" /></a>
          >
          > Anyone see any reason why the border change occurs on hover in IE7, but
          > the opacity settings do not? (100% opaque in all states in IE7, works fine
          > in FF3 though).
          >
          > I also tried filter:progid:DXImageTransform.Microsoft.AlphaImageLoader,
          > which didn't help.

          For a filter to work the element needs to have a layout, so try this:

          .pre:link, .pre:visited {
          display:block;
          border:1px solid #2B1B00;
          zoom:1;
          filter:alpha(opacity=60);
          opacity:0.60;
          -moz-opacity:0.60;
          }


          --
          Thierry
          Articles and Tutorials: http://www.TJKDesign.com/go/?0
          --
          http://developer.yahoo.com/ helps you build applications and mashups

          • 2. Re: What's wrong with this CSS code?
            Level 7
            Hey! It worked. Thanks.

            "Thierry" <thierry@invalid.com> wrote in message
            news:g9me4v$hmb$1@forums.macromedia.com...
            >
            > For a filter to work the element needs to have a layout, so try this:
            >
            > .pre:link, .pre:visited {
            > display:block;
            > border:1px solid #2B1B00;
            > zoom:1;
            > filter:alpha(opacity=60);
            > opacity:0.60;
            > -moz-opacity:0.60;
            > }