• 0

Hover over Boxes


Question

Posted · Report post

Is there a way when you hover over boxes that it can change to gray scale?  or at least something else noticeable?

 

For example, this photography site homepage....when you hover over the boxes of pictures, I want them to turn to gray scale.

 

www.mandyfiock.com

 

Any suggestions?

 

Thanks!

Share this post


Link to post
Share on other sites

39 answers to this question

  • 0

Posted · Report post

Martin Davies Thank you so much for the VERY quick reply. 

 

I added:

img:hover {  
  filter: url(filters.svg#grayscale); /* Firefox 3.5+ */
  filter: gray; /* IE5+ */
  -webkit-filter: grayscale(1); /* Webkit Nightlies & Chrome Canary */

}

 

and now it is disappearing when i hover over them?

 

Also, is there a way to only apply to the boxes?

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Hello lroberts00 

 

Do you have a link to a page where you are implementing this? 

 

When you apply CSS to a particular area or section you need to pinpoint the selector so that it is just applied to the area you want it to affect. Does this make sense? 

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

www.mandyfiock.com

 

Yes, that makes sense, could you help me apply it to the boxes?  I really appreciate it.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

In order ot understand CSS customisation and customisation methods properly, please see the following documents. 

 

For methods to use when implementing Custom CSS & scripts http://support.pagelines.me/docs/customization/customization-methods/

 

and for using Custom CSS http://support.pagelines.me/docs/customization/custom-css/

 

Use firebug or your browser inspection tools to highlight the CSS selectors and isolate the correct CSS code. 

 

All that being said - looks like you have got it spot on http://screencast.com/t/gvxGgkpP 

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Hmm...yours is working, mine disappears?

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

I see you are using safari - mine is in chrome but have tested safari too and it doesn't seem to disappear. Also now the photos are different did you manage to resolve this? 

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

I am in firefox.  It is still doing it?

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

my mistake - let me take a look 

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Different browsers handle CSS differently. Firefox doesn't support this hover CSS in the same way that other browsers do.. 

 

So.. You will need to add CSS for just the Firefox users - more information regarding Greyscale and Firefox can be found here http://stackoverflow.com/questions/609273/convert-an-image-to-grayscale-in-html-css

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

I've given up, tried each one, nothing worked.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Don't give up. i will take a look at your code if you can put it back on your site. 

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Its back on there. I'm frustrated, thanks for your help.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Remove the code you have for your hover and replace it with this:

 

filter: grayscale(100%);
-webkit-filter: grayscale(100%); /* For Webkit browsers */
filter: gray; /* For IE 6 - 9 */
-webkit-transition: all .6s ease; /* Fade to color for Chrome and Safari */
filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#grayscale"); /* Firefox 10+, Firefox on Android */

 

Please be aware we are not a CSS help forum, if you have CSS issues, we recommend you sign up to a CSS help forum. Fore more information on the code I provided above, see here - http://www.cheesetoast.co.uk/add-grayscale-images-hover-css-black-white/

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Thank you very much for your reply and help.  This is not work either in firefox. 

 

I realize you cannot help every CSS question that comes across the forum and I appreciate the links to help me so far as well as other times I've needed assistance, Pagelines has gone above and beyond to help me.  I understand if you chose not to see go any further in assisting me.  Thank you!

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Hi,

I tested the code before I posted, that code does work.

 

Can you post the code you used please.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

img.grayscale{
filter: grayscale(100%);
-webkit-filter: grayscale(100%); /* For Webkit browsers */
filter: gray; /* For IE 6 - 9 */
-webkit-transition: all .6s ease; /* Fade to color for Chrome and Safari */
filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#grayscale"); /* Firefox 10+, Firefox on Android */
}

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Try this:

 

#site .fbox:hover {
filter: grayscale(100%);
-webkit-filter: grayscale(100%); /* For Webkit browsers */
filter: gray; /* For IE 6 - 9 */
-webkit-transition: all .6s ease; /* Fade to color for Chrome and Safari */
filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#grayscale"); /* Firefox 10+, Firefox on Android */
}

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

It makes the picture disappear.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Is the code still active on your site now ?

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Remove that code I gave you and try this:

 

#site .fbox img:hover {
filter: grayscale(100%);
-webkit-filter: grayscale(100%); /* For Webkit browsers */
filter: gray; /* For IE 6 - 9 */
-webkit-transition: all .6s ease; /* Fade to color for Chrome and Safari */
filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#grayscale"); /* Firefox 10+, Firefox on Android */
}

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

No, still disappears.  Thanks for your help.  I guess, if it can just be working on other browsers, we could do something different for firefox.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Hi lroberts00 - Not to beat a dead horse but I was able to get the kind of hover you're looking for working in FF on the carousel at http://myuntangledmedia.com/portfolio/ with the following applied to the img on hover:

 

{filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#grayscale"); /* Firefox 3.5+ */
  filter: gray; /* IE6-9 */
  -webkit-filter: grayscale(100%); /* Chrome 19+ & Safari 6+ */
}

 

May be worth one last try...

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Jake thank so much for the reply, and I don't want to give up on this, because my client really really wants it.  But, what am I doing wrong?  I've applied your code, and still the images disappear in Firefox?

 

www.mandfiock.com

 

attached picture to see

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Hi lroberts00 - I'm up for the challenge if you are and am still hopeful there's a solution somewhere. I'd like to see the site live but am having problems connecting, can you confirm the url for me?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now