0

I'm putting together a site for work using Wix. Currently, the page I am working on has an image on it that is meant to be used by the user to find out what size of disposable gloves they should purchase.

The issue is this image is resized on computers with a smaller resolution. I need this picture to remain at its exact size no matter what the size of the desktop monitor.

Is there a way of accomplishing this through Javascript?

Layout should be visible by link. Thanks!

Bob Arnson
  • 21,377
  • 2
  • 40
  • 47
Mel b
  • 1
  • Sorry, I'm new and it won't let me post an image. Example is in the link here: https://ibb.co/0MJK6zs – Mel b Jan 14 '21 at 16:53
  • Use `img.class-name { width: 100px !important!; min-width: 100px !important!; max-width: 100px !important! }` or something to that effect. – Mr. Polywhirl Jan 14 '21 at 16:53

1 Answers1

3

You do not have access to CSS/HTML on wix (for this context) so the only way you can control image dimensions is using the fitMode property of the image.

Shan
  • 948
  • 1
  • 9
  • 17
  • You can add css/html on wix : https://stackoverflow.com/questions/49877549/how-to-add-custom-css-in-wix-website – ousecTic Jan 15 '21 at 00:06
  • @HenryLy I was talking in context to the question. You cannot alter the image using the HTML/CSS. – Shan Jan 15 '21 at 12:08
  • Hey @Shan! I realize I was wrong to downvote your answer since the fitMode did fix the issue. Anyway even though you don't have direct access to the HTML/CSS you could access the DOM to manipulate their style. Example from the doc. `$w("#myElement").style.backgroundColor = "rgba(255,0,0,0.5)";` Do correct me if this is incorrect though I know you have more experience in Wix. – ousecTic Jan 15 '21 at 13:17