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 4 of 4
  1. #1
    Regular Coder
    Join Date
    Oct 2008
    Posts
    130
    Thanks
    0
    Thanked 4 Times in 4 Posts

    blur, transpareny ie ff issue

    Ok first of all, this code works in IE. An image in a div is blurry, but on mouseover it focuses and it is also opaque. I want to know if there's an easier way to do this and how to get it to work in FF.

    Code:
    <style type="text/css">
    body {
    background-color:red;
    }
    .blur {
    background-image: url(image.gif);
    height:100px;
    width:100px;
    filter:progid:DXImageTransform.Microsoft.Blur();
    }
    .noblur {
    background-color:transparent;
    border:1px solid black;
    height:100px;
    width:100px;
    }
    .opac {
    background-image: url(image.gif);
    border:1px solid black;
    height:100px;
    width:100px;
    filter:alpha(opacity=80);
    opacity:0.8;
    }
    </style>
    
    <div class="noblur">
    <div class="opac">
    <div class="blur" onmouseover="this.className='noblur';" onmouseout="this.className='blur';">
    </div>
    </div>
    </div>
    Last edited by GardenGnome2; 11-23-2008 at 06:19 PM.

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,748
    Thanks
    22
    Thanked 1,838 Times in 1,822 Posts
    Hello GardenGnome2,
    I've never messed around with opacity and filter much... not sure how widely supported that code would be.
    I have done it using 2 images in a rollover, like this. Just make the first image blurry and the rolled image focused
    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
    Senior Coder
    Join Date
    Oct 2005
    Posts
    1,340
    Thanks
    0
    Thanked 61 Times in 60 Posts
    I assume you know that 'filter' is an IE only thing and not standard. I've seen articles on how to do a blurring effect for other browsers so you can google for that.

  • #4
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    Easiest option would be to do a kind of sprite for the blur and there are options for transparency seen here.

    www.mandarindesign.com/opacity.html
    jeremy - gnomeontherun
    Educated questions often get educated answers, and simple questions often get simple answers.


  •  

    Posting Permissions

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