Envira Gallery Blog
Digital Photography Tips, Tutorials and Resources
Digital Photography Tips, Tutorials and Resources
Last updated on Apr 29, 2019 by Waseem Abbas Reader Disclosure
Would you like to style gallery images on hover? With Envira and a little CSS this can be easily done. This tutorial will help you with the CSS you need to style your gallery images on hover.
First you’ll need to either create a new gallery or edit an existing gallery. If you need any help creating your first gallery, please review our documentation here.
The next step you’ll need to install and activate Envira’s CSS Addon. Navigate to the Addons section and click Install then Activate on the CSS Addon.
Below is the CSS we’ve used in our demo.
You’ll need to change this ID number to match your gallery ID number. You can find this by looking in the sidebar of your gallery edit screen.
For more information on how to find your gallery ID number you can read this article.
You can also just add this CSS to the WordPress Customizer to make this change for all of your Envira Galleries!
To find out more about the WordPress Customizer, please review our article on How to add custom CSS to the WordPress Customizer.
#envira-gallery-wrap-336463 .envira-gallery-item img:hover { box-shadow: 0 10px 15px rgba(0,0,0,0.3); transition: box-shadow 0.3s ease-in-out; cursor: pointer; }
If you’ve got Envira Lazy Load enabled on the Configuration Tab of the gallery, the CSS you’d use is this:
#envira-gallery-wrap-336463 .envira-gallery-item .envira-lazy:hover { box-shadow: 0 10px 15px rgba(0,0,0,0.3); transition: box-shadow 0.3s ease-in-out; cursor: pointer; }
-336463
with your own gallery ID numberHave a look below to see how the CSS has changed our gallery images on hover.
If you’re going to want this change for all galleries, just remove the gallery ID number from the CSS and add your CSS to the Appearance » Customize » Additional CSS and click Publish to save the changes.
Would you like to add some other styling to your gallery? Have a look at our tutorial on How to Customize the Lightbox Close Button.
A: Absolutely! You’d use exactly the same CSS but just be sure the ID matches the album. If you added your CSS to the WordPress Customizer then it would automatically make this change for all Envira gallery and album images.
Envira Gallery helps photographers create beautiful photo and video galleries in just a few clicks so that they can showcase and sell their work.
Hi : Could we use this tool for “GROW” hover effect? Thank you so much. Sincerely, Kaiser
Hey Kaiser, can you please elaborate more? We would love to help!
This does not work. I do not have the image opacity in config. I purchased the plus theme. I loaded the addons.
Hi Nicole 🙂 I’d be happy to have a look for you if you would like to open a ticket up with support!
Same issue here. Just bought the pro version, and added the Gallery Themes addon. Seems to have everything else I’m looking for, but don’t see the opacity option.
The gallery I’m testing it on was originally created in the Lite version, so not sure if that could be the issue.
Hey John 🙂 I’m so sorry for the confusion! Actually the plugin has changed quite a bit and I’ve now updated this article to reflect the new way (using CSS). If you need anything else, please just let me know!