You need to be logged in to post in the forum - Log In

An active JCE Pro Subscription is required to post in the forum - Buy a Subscription

Support is currently Offline

Official support hours
Monday to Friday
09:00 - 17:00 Europe/London (BST)

Please create a new Ticket and we will get back to you as soon as we can.

#100503 Mediabox at % width and image inside resized to fit

Posted in ‘Mediabox’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Latest post by Ryan on Wednesday, 10 July 2019 10:36 BST

sageman
Hi Ryan, my Mediabox popup is set to 88% witdh and height. The images therein should fit into this frame - at the basic setting using the standard theme, images are stretched to 100% width and if upright, the bototm cut off. I am using this in my css:

#jcemediabox-popup-content > embed, #jcemediabox-popup-content > img, #jcemediabox-popup-content > object, #jcemediabox-popup-content > video {
  object-fit: contain;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  margin-left: -25%;
  padding-left: 50%;
}
but it does not work for all images... Please take alook here: https://live.franzkmail.de/weblog-uebersicht.html

sageman
I just realized: the marketing team has me fooled - the CSS works as expected, but some of the large images are not quite large enough 😃 - I assumed the image size would always be too big, as they use images from all over the place...

Anyway, is there a better way? Ideally, the medaibox would shrink if content is physically too small.

Ryan
Please try JCE MediaBox 2.0.11 - https://www.joomlacontenteditor.net/downloads/mediabox/latest

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.