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.
The 'Scale' option is almost OK, when speaking of responsive design. E.g. when I set one of the popup styles to scale and width to 0.8 - the popup contact form always fits. The only issue is that I need max-width, so it won't become too wide on wide screens. Such an option would be most beneficial (I tried to do it with CSS but then the modal window loses it's centering).
Any idea? Please help.
Comments
Comment #1
Manuel Garcia CreditAttribution: Manuel Garcia commentedI totaly second this request.
Ive also tried making the popup behave nicely in all resolutions, but if you set max-widths in your css file, the js overrides/ignores it with its inline widths.
Comment #2
rp7 CreditAttribution: rp7 commentedHas anyone found a (temporary) workaround for this?
Comment #3
AlfTheCat CreditAttribution: AlfTheCat commentedAh, I knew this module had to be too good to be true :(
It's indeed not suitable for mobile without stripping all elegance on desktops. Hope this can be implemented one day. I've tried every single modal/popup solution out there over the past few years but it seems to be one of those things Drupal just can't really do.
Comment #4
gausarts CreditAttribution: gausarts commentedJust in case useful to anyone else:
You may want to add ugly !important declaration, or use max-width to stop inline JS styles from setting rigid width. Otherwise the JS route is another option.
Comment #5
danithaca CreditAttribution: danithaca commentedComment #6
Leagnus CreditAttribution: Leagnus commented#4 helps much. Thank You.
Comment #7
rahuldolas123 CreditAttribution: rahuldolas123 commented#4 worked for me too. Thanks!
Comment #8
Manuel Garcia CreditAttribution: Manuel Garcia as a volunteer and at Appnovation commentedI'm thinking this should be fixed on ctools itself, since its there where the inline width is being set (
js/modal.js
).There are two opened issues with patches that might be useful to contribute to, so adding them as related.
Feel free to close this as duplicate if necessary. For now I'm leaving it opened for visibility.
Comment #9
jkdev CreditAttribution: jkdev commentedQuick fix for Bootstrap theme
Since this post has high rank at google, Please find attached quick fix for responsive ctools modal.
We used the defaults at modal.js
The problem for us was that ctools modal took 80 precent of the viewport always. This is fine under mobile, but in desktop - it looked huge.
We have added the folowing CSS to override this problematic huge width.