Hello,
i tried to setup a popup window and want to change the size.
I installed php code:
function inline_popup_enabler(){
?>
<script>
(function($){
$(window).load(function() {
$(‘.inline_popup’).magnificPopup({
type:’inline’,
midClick: true
});
});
})(jQuery);
</script>
<?php
}
add_action(‘wp_footer’, ‘inline_popup_enabler’);
After this I created a Popup window with ID demopop and CSS mfp-ide.
if I click an a link on my testpage the popup opens. But the width is on the full screen.
I tried to change the custom CSS like this:
.page-id-demopop .mfp-iframe-holder .mfp-content {
line-height: 0;
width: 100%;
max-width: 1600px;
}
.page-id-demopop .mfp-iframe-scaler {
padding-top: 56.25%;
}
But it don’t work!!! (!Important) didn’t help
Any solution?
Thanks!
Hey csglta,
Add this to quick css:
.mfp-container.mfp-s-ready.mfp-inline-holder{
padding:0 300px!important;
}
Best regards,
Jordan Shannon
perfect! thanks for <our very quick answer!!!
any solution to get the popup rounded edges or maybe shadow?
would be nice to have, but not important :-)
Hi,
I’m glad that worked. For rounded corners add this to quick css:
.mfp-content #demopop{
border-radius:15px!important;
}
Best regards,
Jordan Shannon
perfect!
but now I have a problem to call the popup
I use a code block element with a own creation of a button.
see Private Content
If i try to implement the call to my popup () my button works not longer correct.
What ca I do?
I found the issue!
Enfold theme options > Advanced Styling and edit “Linked Image Overlay” –> disable
Thanks!
Hi csglta,
We’re glad that you found the cause of the issue.
Let us know if you need further assistance :)
Best regards,
Nikko