1334
Views
6
Comments
Solved
How can I resize a Modal?

Hi,

How can I change the width and height of a Modal?


Thank you in advance.

2021-05-25 20-26-04
Bernardo Condé
Solution

Hi,

You can override modal CSS on the page you are using it on.

The default is 100%, but you put in px, you can manipulate the size.


.ModalContainer {

    width: 1000px !important;

}


The same goes for the height.



I hope to help.

UserImage.jpg
George Rodrigues

Bernardo Condé wrote:

Hi,

You can override modal CSS on the page you are using it on.

The default is 100%, but you put in px, you can manipulate the size.


.ModalContainer {

    width: 1000px !important;

}


The same goes for the height.



I hope to help.

 I tried this but doesn't work. I solved making a copy of Modal WebBlock to my module and editing in extended properties.



2019-01-04 10-45-45
Sravan Vanteru

Hi João Lopes,

As Conde mentioned that is one way you can handle, but in some scenarios it will give a issues as its fixed size, always go with % rather than pixels. Create class and apply width and height in %, use the same class on model.


Sravan

2021-05-25 20-26-04
Bernardo Condé

Yes, 

as Vanteru said, depending on what you need might be that the size in px will bother you, because it's a fixed size you lose responsiveness. Always good to use percentage, but if your use has no problem, the px will be useful to put in the ideal size for your use.


2021-02-16 19-36-41
João Lopes

Thank you for your replies!

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.