Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have a media_gallery setup and it works fine, but when I view it in mobile devices, the colorbox overlays are huge and do not snap to the portal width.
The setting "Max width" at
/admin/config/media/colorbox
does not appear to do anything.
I've checked css and cannot find a conflict. The styles are applied inline in the markup.
Comment | File | Size | Author |
---|---|---|---|
#1 | Colorbox-max-width-on-mobile-1996584.patch | 356 bytes | roberttstephens |
Comments
Comment #1
roberttstephens CreditAttribution: roberttstephens commentedDo you think this is coming from colorbox/styles/default/colorbox_style.css around line 62?
It seems that setting max-width: to none is causing the problem, which I don't believe should be the default as it results in a poor user experience. I believe this should be fixed, so the image gets resized depending on the browser size.
The change should be
- max-width: none;
+ max-width: 100%;
+ max-height: 100%;
I've attached a patch.
Comment #2
codycraven CreditAttribution: codycraven commentedConfirming 100% max width and height fixes the problem for me of scrolling.
Comment #3
renatogThanks people.
Comment #5
renatogFixed.
Commited in dev branch.
Regards.