Active
Project:
Ctools
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
24 Dec 2012 at 00:30 UTC
Updated:
2 Jun 2017 at 15:36 UTC
Jump to comment: Most recent
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 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 commentedHas anyone found a (temporary) workaround for this?
Comment #3
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 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 commentedComment #6
Leagnus commented#4 helps much. Thank You.
Comment #7
rahuldolas123 commented#4 worked for me too. Thanks!
Comment #8
manuel garcia 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 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.