Welcome to MyPresta.eu – Your reliable partner in the e-commerce world. Find innovative modules that will take your business to a new level.
In this guide i want to show you how easily you can add nice hover effect to your images. With this effect your images will be gray and when someone will hover mouse over it - images will be colored to original colors. This guide contains only one simple thing - modification of css styles. In fact, we will not modify any original styles definition, we will add new code to main stylesheet file. This guide will work in PrestaShop 1.6, 1.5, 1.4
Hover effect example
![]() |
![]() |
![]() |
Global.css stylesheet styles
Open file located in your theme directory: themes/YOUR_THEME/css/global.css and and the end of this file paste this code:
img { 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+ */ }img:hover
{ filter: none; -webkit-filter: grayscale(0%); }
And thats all, now all images in your store will be grayed, and when someone will hover mouse over it - image will be colored.
Artykuł napisany przez Milosza Myszczuka, eksperta PrestaShop i oficjalnego moderatora społeczności PrestaShop. CEO i założyciel agencji interaktywnej VEKIA. Dowiedz się więcej.
If you like this article, support our work!

The Currency Exchange Module offers unparalleled flexibility in managing international sales. Regard...
19.99 €

Automatic National Bank of Ukraine (NBU) currency rates integrator. The module guarantees precise pr...
19.99 €

Automatic Bank of Spain (Banco de España - BdE) currency rates integrator. The module guarant...
19.99 €

Integrate your store with the Central Bank of the Republic of Turkey (TCMB) using this module. It au...
19.99 €