is there any guideline for making a true responsive modal windows?

I am making a modal windows,
However, I found that determine width,height of an object by using percentage is not suitable.
So, is there any guideline for making a true responsive modal windows?
I attached my work for your reference.
gg.html
LVL 7
KNVB HKSITOAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ares KurkluSoftware EngineerCommented:
Do you want to do it yourself? may be easier to use bootstrap or jquery

https://v4-alpha.getbootstrap.com/components/modal/#modal-components
https://jqueryui.com/dialog/
0
KNVB HKSITOAuthor Commented:
I am using jAlert, however it cannot accept a DOM object as content, therefore I want to build it by myself.

Any other jquery plugin can accept a DOM object as content are welcome also.
0
Ares KurkluSoftware EngineerCommented:
Not sure what you are trying to do exactly but how about the 2nd one jquery dialog?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

KNVB HKSITOAuthor Commented:
I need to set an unsorted list (i.e. ul) as content.
When each list item on click , I want to call my JavaScript object class, however, the inline on click handler cannot found my JavaScript object class, that is my problem.
0
Julian HansenCommented:
What you are probably needing to do is combine % height / width with media queries

Media queries enable you to change the style of an element depending on the metrics of the screen.

The general rule of thumb is to create your modal for mobile first
width 100% 

Open in new window


Then for the next size screen
@media (min-width: 768px) {
   .modal {
       width: 75%;
   }
}
@media (min-width: 1024px) {
   .modal {
       width: 50%;
   }
}

Open in new window


The above is for illustration purposes only - it is demonstrating how you can modify styles based on size of screen starting from a base (mobile) and then amending as the screen size increases. Obviously you can add other styles (other than width) to the above as required.
0
KNVB HKSITOAuthor Commented:
I solved the problem by using flexbox.
However, MS Edge browser seem does not support overflow css attribute.
Currently, I cannot solve this problem.
Please find attached my work.
modal2.5.html
0
KNVB HKSITOAuthor Commented:
Finally, I got what I want.
modal2.6.html
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
KNVB HKSITOAuthor Commented:
That is what I want.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
CSS

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.