Content Area Modal in Mobile View

Is there an (easy) way to make a content area modal fullscreen below a certain breaking point? Or at least reduce the margins.

Hi There,

Thanks for writing in!

Please setup the modal like the screenshot.

Then add this css to your theme option-> Global css

@media  (max-width: 768px) {
.x-modal-content-inner {
   padding : calc(.5em*2) !important;
}
}

You can adjust the value for your target screen size.

Hope this is something you are looking for.

1 Like

Works like a charm.

Just one followup: Is there a way to place the x-modal-close inside the x-modal-content? Cause that’s the place I would be looking for it.

Hi,

To move it inside the modal, you can add this in Theme Options > JS

jQuery(function($) {
    $( ".x-modal-close" ).prependTo( ".x-modal-content" );
});

Then add this in Theme Options > CSS

.x-modal-close {
   color:#000;
}

Hope that helps.

2 Likes

Perfect, thanks

You’re more than welcome, glad we could help.

Cheers!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.