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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

roberttstephens’s picture

Do 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.

codycraven’s picture

Status: Active » Reviewed & tested by the community

Confirming 100% max width and height fixes the problem for me of scrolling.

renatog’s picture

Issue summary: View changes

Thanks people.

renatog’s picture

Status: Reviewed & tested by the community » Fixed
Issue tags: +ciandt-contrib

Fixed.

Commited in dev branch.

Regards.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.