0
I am programming in PHP, HTML and Javascript to create an online store, integrated in the Opencart platform. Everything is already working correctly, except a small detail with CSS. I put the effect hover
in the image of the different products simply using image a:hover
. However, although it works on all browsers, on some pages of the Chrome site, the effect does not run!
.box-product .image {
/**display: inline-block;
margin-bottom: 15px;
margin-left: 20px;
display: block;
max-width: 100%;
height: auto;**/
margin-bottom: 22px;
padding-bottom: 15px;
display: block;
text-align: center;
background: white;
/**box-shadow: 0px 0px 3px #AAA inset**/
border: 0px solid white;
-webkit-transition: all 0.3s ease-in-out;
-moz-transition: all 0.3s ease-in-out;
-o-transition: all 0.3s ease-in-out;
-ms-transition: all 0.3s ease-in-out;
transition: all 0.3s ease-in-out;
}
.box-product .image img {
padding: 3px;
border: 0px solid #E7E7E7;
display: block;
max-width: 100%;
height: auto;
margin:auto;
}
.box-product .image a:hover {
opacity:0.5; filter:alpha(opacity=50);
}
http://jigsaw.w3.org/css-validator/
– Peter
.box-product . image { /display: inline-block; margin-bottom: 15px; margin-left: 20px; display: block; max-width: 100%; height: auto;/ margin-bottom: 22px; padding-bottom: 15px; display: block; text-align: center; background: white;/box-shadow: 0px 0px 3px #AAA inset/ border: 0px Solid white; -Webkit-Transition: all 0.3s Ease-in-out; -Moz-Transition: all 0.3s Ease-in-out;-o-Transition: all 0.3s Ease-in-out;-ms-Transition: all 0.3s Ease-in-out;Transition: all 0.3s Ease-in-out;}. box-product . image a:Hover {opacity:0.5; filter:alpha(opacity=50);}
– sara
Copying this code in the W3C Validator will give the answer (which has to do with opacity)
– Peter
Could you post html? The image is inside the anchor or outside?
– Eduardo Cucharro