laurenashpole / vue-inner-image-zoom

https://laurenashpole.github.io/vue-inner-image-zoom
140 stars 16 forks source link

Css conflict #41

Open jdessain opened 2 years ago

jdessain commented 2 years ago

Hi, I have the following rule for responsive images in my main css file : img { max-width: 100%; height: auto; }

The height property also apply to the zoom image with the class iizzoom-img and it causes a strange offset. The zoom image is not center anymore. If I remove the height : auto, everything work fine but since I need this property, I'm looking for a way to overwrite it in my css but I couldn't find a working solution. I tried the following but it doesn't seem to work : .iizzoom-img { height: unset; }

Do you have any idea? Thanks

szabizs commented 2 years ago

I have the exact same problem. Any ideas on how to solve this?

laurenashpole commented 2 years ago

I need a little more information to look into this further. On the most recent versions of Chrome, Safari, and Firefox the computed value for the height seems to reflect the zoom image's height attribute even with that global image styling. It's possible some other settings are conflicting or other styling is interacting in an odd way.