News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Image custom field, how to change css of image selected?

Started by kerman, February 22, 2018, 12:22:58 PM

Previous topic - Next topic

kerman

Hi!

I have a problem with image custom field.

I already hidden the radio button, so only the image is shown. But when you click in the image nothing happens, so the user doesn't know if it's already selected.

IS there a way with css so I can change the css property of the image when it has been selected?

My Joomla version is 3.8.5
Virtuemart version: 3.2.12
PHP: 7.0.27
Livesite: https://goo.gl/Zr4bX4

Thanks.

jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

kerman

Ok, sorry.

My Joomla version is 3.8.5
Virtuemart version: 3.2.12
PHP: 7.0.27
Livesite: https://goo.gl/Zr4bX4

Thanks.

Studio 42

Hi,
To use same style as the Size (S, M, L ...)  add CSS in your template:
.product-field-type-M  input[type="radio"]:checked+img{
    border: 2px solid #555555 !important;
    box-shadow: 0 0 4px rgba(10, 10, 10, 0.5);
    color: #474949;
}