MBurly33 Posted March 31, 2023 Posted March 31, 2023 I have some image blocks on a page and I am trying to get just some interaction by adding a hover state to them by just targeting the images using the section Data ID, but for some reason, I can't get it to work. If I change the size of the image just normally it works, but when I try to change it on hover it doesn't.. any help? Here is my code: section[data-section-id="6425e7c2d407585e86625dc3"] img { transform: scale(1) !important; transition: .4s ease all; } section[data-section-id="6425e7c2d407585e86625dc3"] img:hover { transform: scale(1.1) !important; } Here is the specific page: https://treetopbusiness.com/services
Web_Solutions Posted March 31, 2023 Posted March 31, 2023 (edited) Add this code. section[data-section-id="6425e7c2d407585e86625dc3"] .image-block:hover img { transform: scale(1.1) !important; } And remove this code section[data-section-id="6425e7c2d407585e86625dc3"] img:hover { transform: scale(1.1) !important;} Edited March 31, 2023 by Web_Solutions If my comments are useful, please like and mark my solution as answer. It will encourage me. Thanks MD Rofik Website Designer and Digital Marketer ☕Am I helpful? Want to offer me a coffee? ✉ Send me a message if needed any help. I'll try to reply as soon as possible.
briangagliardi Posted April 3, 2023 Posted April 3, 2023 @Web_Solutions I have a section on my page that includes video blocks with custom featured images. I want the custom featured image to go from grayscale to color when hovering over a specific video block. I have the custom featured images converted to grayscale but I can't seem to get the hover to work. Any suggestions? -- [data-section-id="642665ba988b72265e7abe14"] img { transition: .5s ease-in-out; filter: grayscale(1); } [data-section-id="642665ba988b72265e7abe14"] img:hover { filter: none; }
tuanphan Posted April 6, 2023 Posted April 6, 2023 On 4/3/2023 at 9:55 AM, briangagliardi said: I have a section on my page that includes video blocks with custom featured images. I want the custom featured image to go from grayscale to color when hovering over a specific video block. I have the custom featured images converted to grayscale but I can't seem to get the hover to work. Any suggestions? -- [data-section-id="642665ba988b72265e7abe14"] img { transition: .5s ease-in-out; filter: grayscale(1); } [data-section-id="642665ba988b72265e7abe14"] img:hover { filter: none; } If you share link to your site, we can check easier Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment