I tried with lots of similar questions regarding pop-up resize, but what I need is that the pop-up should be resizable between min-width: 500px
to max-width :900px
(without using width in percentage) based of browser resize such that the pop-up comes at center of screen.
Code snippet:
<html>
<head>
<style type="text/css">
.pop-box {
position: absolute;
top : 25%;
left: 15%;
min-width: 500px;
//width : 70%;
width: 900px;
min-height : 200px;
max-height: 500px;
border: 5px solid black;
}
</style>
</head>
<div class='pop-box'></div>
</html>
Note:
1. The changes should to be done only in CSS (@media query Or CSS change).
2. Thewidth: 900px; & position: absolute;
in .pop-box{...} should not be changed.
3. Thewidth
of .pop-box{..} should not be in percentage.
Expected Results:
1) If Browser & Box have same width then, the box should look like as below:
2) If Browser is resized(streched) to around 800px then Box(around 600px) should be at center of screen as below:
3) If Browser is resized(streched) to full screen then Box of Full size width:900px should be at center of screen as below:
Thanks.