Results 1 to 3 of 3

Thread: mouse over glow

  1. #1
    Join Date
    Sep 2008
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default mouse over glow

    Basically, I need my pics to light up when the mouse rolls over it to show that it's clickable. Question is, should i go hunt for a javascript to do it or would the mouse over command in css be a better choice?

  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

    It depends. If you want a smooth gradual effect, javascript would be better. If you just want an image change immediately from - say 70% opacity to full opacity, css would be fine. But the opacity style property isn't standard across browsers, so several properties would need to be defined for full cross browser support. And the hover pseudo class is only supported for anchor links in earlier (6 and 5.5) versions of IE, so you would need to do it on the image(s) as children of the link, ex*:

    Code:
    a img {
    opacity:0.7;
    filter:alpha(opacity=70);
    border:none;
    }
    a:hover img {
    opacity:0.9999;
    filter:alpha(opacity=100);
    }
    HTML Code:
    <a href="whatever.htm"><img src="some.gif" alt=""></a>
    * Only opacity and filter:alpha(opacity) are shown in this example, as they cover virtually all modern browsers that support opacity style. The only other two types are:

    Code:
    -moz-opacity:0.7;
    -khtml-opacity:0.7;
    Which are for older Mozilla (NS before v6 or so, some others perhaps) based and older Safari (less than 2 or 2 point something - not sure when it changed to generic opacity, it's at 3+ now) browsers respectively.
    Last edited by jscheuer1; 09-09-2008 at 05:31 AM. Reason: added required leading dash for -moz and -khtml
    - John
    ________________________

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

  3. The Following User Says Thank You to jscheuer1 For This Useful Post:

    Mystech (09-09-2008)

  4. #3
    Join Date
    Sep 2008
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    drat, it seems the more i learn, the more i need to learn... can't these dratted companies agree to one... Thanks a bunch.

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
  •