I have the following code:
UPDATED:
.container {
height: 100%;
width: 100%;
background: #eee;
position: absolute;
}
.box {
height: 100px;
width: 100px;
background: #222;
position: absolute;
/*Centering Method 2*/
margin: -50px 0 0 -50px;
left: 50%;
top: 50%;
}
from: http://designshack.net/articles/css/how-to-center-anything-with-css/
== BUT what I want is the modal box to have a width relative to the responsive container div.
Is there any way to make a truly responsive modal box in a response div ?
You did not use it in correct way, that function has to be initialized on doc ready with use of latest jquery.
This is the
jQuerycode-use the jquery this way:
but make sure to add the latest jquery plugin
your little
updated css: