CSS Popup With Button to Close - css

I am Using CSS for controlling and showing POPUP on my page, everything works fine, but i want Okay button to close popup instead of close it by clicking on cross button on right top corner . is there any way for doing this in css. or what can i do alternative for this.
.box {
width: 40%;
margin: 0 auto;
background: rgba(255,255,255,0.2);
padding: 35px;
border: 2px solid #fff;
border-radius: 20px/50px;
background-clip: padding-box;
text-align: center;
}
.button {
font-size: 1em;
padding: 10px;
color: #fff;
border: 2px solid #06D85F;
border-radius: 20px/50px;
text-decoration: none;
cursor: pointer;
transition: all 0.3s ease-out;
}
.button:hover {
background: #06D85F;
}
.popup h2 {
margin-top: 0;
color: #333;
font-family: Tahoma, Arial, sans-serif;
}
.popup .close {
position: absolute;
top: 20px;
right: 30px;
transition: all 0.2s;
font-size: 30px;
font-weight: bold;
text-decoration: none;
color: #333;
}
.popup .close:hover {
color: #06D85F;
}
.popup .content {
max-height: 30%;
overflow: auto;
}
/*Let's make it appear when the page loads*/
.overlay:target:before {
display: none;
}
.overlay:before {
content:"";
top: 0;
left: 0;
right: 0;
bottom: 0;
display: block;
background: rgba(0, 0, 0, 0.6);
position: fixed;
z-index: 9;
}
.overlay .popup {
background: #fff;
border-radius: 5px;
width: 64%;
position: fixed;
top: 25%;
left: 18%;
padding: 25px;
margin: 70px auto;
z-index: 10;
-webkit-transition: all 0.6s ease-in-out;
-moz-transition: all 0.6s ease-in-out;
transition: all 0.6s ease-in-out;
}
.overlay:target .popup {
top: -100%;
left: -100%;
}
#media screen and (max-width: 768px){
.box{
width: 70%;
}
.overlay .popup{
width: 70%;
left: 15%;
}
}
<!--popup starts-->
<div id="popup1" class="overlay">
<div class="popup">
<h3 style="margin-bottom: 13px; text-align:center; color:red;">Your Application Id : <?php echo $appid;?></h3>
<a class="close" href="#popup1">×</a>
<div class="content">
Thank you <span style="text-transform:uppercase; font-weight:600;"><?php echo $firstname;?> <?php echo $middlename;?> <?php echo $surname;?></span> for registring for e-visa service.there is more text.
</div>
</div>
</div>
<!--popup end-->

.... or you could just use an anchor styled as a button
.popup h2 {
margin-top: 0;
color: #333;
font-family: Tahoma, Arial, sans-serif;
}
.popup .close {
display:block;
border:1px solid darkblue;
text-align:center;
background: steelblue;
color:white;
border-radius:5px;
padding:5px;
}
.popup .close:hover {
color: #06D85F;
}
.popup .content {
max-height: 30%;
overflow: auto;
}
/*Let's make it appear when the page loads*/
.overlay:target:before {
display: none;
}
.overlay:before {
content:"";
top: 0;
left: 0;
right: 0;
bottom: 0;
display: block;
background: rgba(0, 0, 0, 0.6);
position: fixed;
z-index: 9;
}
.overlay .popup {
background: #fff;
border-radius: 5px;
width: 64%;
position: fixed;
top: 0;
left: 18%;
padding: 25px;
margin: 70px auto;
z-index: 10;
-webkit-transition: all 0.6s ease-in-out;
-moz-transition: all 0.6s ease-in-out;
transition: all 0.6s ease-in-out;
}
.overlay:target .popup {
top: -100%;
left: -100%;
}
#media screen and (max-width: 768px){
.box{
width: 70%;
}
.overlay .popup{
width: 70%;
left: 15%;
}
}
<!--popup starts-->
<div id="popup1" class="overlay">
<div class="popup">
<h3 style="margin-bottom: 13px; text-align:center; color:red;">Your Application Id : <?php echo $appid;?></h3>
<div class="content">
Thank you <span style="text-transform:uppercase; font-weight:600;"><?php echo $firstname;?> <?php echo $middlename;?> <?php echo $surname;?></span> for registring for e-visa service.there is more text.
</div>
<a class="close" href="#popup1">OK</a>
</div>
</div>
<!--popup end-->

Related

i want button container to be hidden after the hover ends

**i want button container to be hidden after the hover ends, when hover and the overlay appear, i want button container to be visible and when hover ends i want it to be hidden so i tried visiblity: visible but its not working, i also tried (display: none and display:block) and its also not working!
.container{
width:300px;
height: 300px;
background-color: red;
position: relative;
margin: auto;
}
img{
display: block;
width: 100%;
height: 100%;
/* position: absolute;
right:0;
top:0px; */
}
.overlay{
background-color: grey;
opacity: 0.5;
width: 3%;
height: 100%;
position: absolute;
top:0;
right: 0;
/* left:100%; */
transition: width 0.6s ease-out;
}
.container:hover .overlay{
width: 100%;
/* left:0% */
}
.overlay a{
color: white;
display: block;
text-decoration: none;
border-bottom: 5px;
margin-top: 9px;
}
#button-container{
visibility: hidden;
width: 120px;
height: 30px;
position: relative;
background-color: black;
color: white;
margin:70px auto;
text-align: center;
line-height: 2em;
}
#button-overlay{
width:10px;
height: 100%;
background-color: white;
position: absolute;
right: 0;
top:0;
transition: width 0.4s;
}
#button-container:hover #button-overlay{
width: 100%;
}
#button-container:hover #button-container{
visibility: visible;}
#button-container:hover #learn-more{
color: black;
}
<body>
<div class ="container">
<img src="3.jpeg" alt="">
<div class="overlay">
facebook
twitter
instagram
<div id="button-container">
<a id="learn-more" >learn more</a>
<div id="button-overlay"></div>
</div>
</div>
</div>
</body>
Try scaling your button-container from 0 to 1 with transition delay.
.container{
width:300px;
height: 300px;
background-color: red;
position: relative;
margin: auto;
}
img{
display: block;
width: 100%;
height: 100%;
/* position: absolute;
right:0;
top:0px; */
}
.overlay{
background-color: grey;
opacity: 0.5;
width: 3%;
height: 100%;
position: absolute;
top:0;
right: 0;
/* left:100%; */
transition: width 0.6s ease-out;
}
.container:hover .overlay{
width: 100%;
/* left:0% */
}
.overlay a{
color: white;
display: block;
text-decoration: none;
border-bottom: 5px;
margin-top: 9px;
}
.container:hover #button-container{
transform: scale(1);
}
#button-container{
width: 120px;
transform: scale(0);
height: 30px;
position: relative;
background-color: black;
color: white;
margin:70px auto;
text-align: center;
line-height: 2em;
transform-origin: left top;
trnasition: all 250ms ease-in-out;
transition-delay: 250ms;
}
#button-overlay{
width:10px;
height: 100%;
background-color: white;
position: absolute;
right: 0;
top:0;
transition: width 0.4s;
}
#button-container:hover #button-overlay{
width: 100%;
}
#button-container:hover #button-container{
visibility: visible;}
#button-container:hover #learn-more{
color: black;
}
<body>
<div class ="container">
<img src="3.jpeg" alt="">
<div class="overlay">
facebook
twitter
instagram
<div id="button-container">
<a id="learn-more" >learn more</a>
<div id="button-overlay"></div>
</div>
</div>
</div>
</body>

Dropdown menu vanishing when hovering over background text

I can't utilize the main dropdown menu on the site I'm developing because if you move too slowly or if you mouse over text that is in the background in the child element behind it, it will vanish.
I've tried adding !important tags. I've tried looking for any gaps between elements. I've tried adjusting the z axis priority values.
.dropdown {
position: fixed;
top: 1vmin;
left: 1vmin;
width: 10vmin;
height: 10vmin;
display: inline-block;
}
.dropdown:hover .dropdown-content {display:block !important;}
.dropbtn {
background color: black;
color: black;
border: none;
}
.dropdown-content {
display: none;
position: absolute;
background-color: #f1f1f1;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 99999;
}
.dropdown-content a {
color: black;
padding: 10px 10px;
text-decoration: none;
display: block !important;
}
.dropdown-content a:hover {background-color: red;}
.header {
position: fixed;
top: 1vmin;
width: calc(100vw - 14vmin);
height: 10vmin;
transform: translate(11vmin, 0vmin);
text-align: center;
padding: 0vmin;
vertical-align: middle;
dislpay: table-cell;
}
.header a {
float: left;
font-size: 4vmin;
color: white;
text-align: center;
vertical-align: middle;
padding: 1vmin 1vmin;
text-decoration: none;
}
table {
table-layout: auto;
width: 100%;
border: 1vmin solid black;
}
td {
border: 1px solid black;
overflow: hidden;
text-overflow: ellipsis;
}
td a:hover {background-color: red;}
.navbar {
width: 10vmin;
height: 10vmin;
position: relative:
border: 0.5vmin solid #49b293;
cursor: pointer;
transition: all 0.3s ease;
}
.navbar div {
height: 0.8vmin;
width: 6vmin;
background-color: #fff;
position: absolute;
transition: all 0.5s ease;
}
.navbar .first {
top: 2.5vmin;
left: 2vmin;
}
.navbar .second {
top: 4.5vmin;
left: 2vmin;
}
.navbar .third {
top: 6.5vmin;
left: 2vmin;
}
.navbar:hover .first {
width: 4vmin;
transform: translate(0vmin, 4.75vmin) rotate(50deg);
transition: all 0.5s;
}
.navbar:hover .second {
opacity: 0;
transition: all 0.5s;
}
.navbar:hover .third {
width: 4vmin;
transform: translate(2.25vmin, 0.5vmin) rotate(-50deg);
transition: all 0.5s;
}
.navbar:hover {
border-radius:5vmin;
transition: all 0.3s ease;
}
.mainbody {
position: relative;
width: 100%;
top: 13vmin;
z-index:1;
}
</style>
<div class="dropdown" style="background-color:black;">
<button class="dropbtn" style="background-color:black;">
<div class="navbar">
<div class="first"></div>
<div class="second"></div>
<div class="third"></div>
</div>
</button>
<div class="dropdown-content">
Link 1
Link 2
Link 3
</div>
</div>
<div class="header" style="background-color:black;">
<table style="background-color:black;">
<tr>
<td>Home</td>
<td>IT</td>
<td>Science</td>
<td>Tech</td>
<td>News</td>
<td>Top</td>
</tr>
</table>
</div>
<div class="mainbody">
<h1>RoyHQ</h1>
</div>
</body>
</html>
I'd like for the drop menu to be relatively resilient to vanishing. It's not, it's almost unusable.
Click menu now!
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<style>
.dropdownzzz {
position: fixed;
top: 1vmin;
left: 1vmin;
width: 10vmin;
height: 10vmin;
display: inline-block;
}
.dropbtn {
background color: black;
color: black;
border: none;
}
.dropdown-content {
display: none;
position: absolute;
background-color: #f1f1f1;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 99999;
}
.dropdown-content a {
color: black;
padding: 10px 10px;
text-decoration: none;
display: block !important;
}
.dropdown-content a:hover {background-color: red;}
.header {
position: fixed;
top: 1vmin;
width: calc(100vw - 14vmin);
height: 10vmin;
transform: translate(11vmin, 0vmin);
text-align: center;
padding: 0vmin;
vertical-align: middle;
dislpay: table-cell;
}
.header a {
float: left;
font-size: 4vmin;
color: white;
text-align: center;
vertical-align: middle;
padding: 1vmin 1vmin;
text-decoration: none;
}
table {
table-layout: auto;
width: 100%;
border: 1vmin solid black;
}
td {
border: 1px solid black;
overflow: hidden;
text-overflow: ellipsis;
}
td a:hover {background-color: red;}
.navbar {
width: 10vmin;
height: 10vmin;
position: relative:
border: 0.5vmin solid #49b293;
cursor: pointer;
transition: all 0.3s ease;
}
.navbar div {
height: 0.8vmin;
width: 6vmin;
background-color: #fff;
position: absolute;
transition: all 0.5s ease;
}
.navbar .first {
top: 2.5vmin;
left: 2vmin;
}
.navbar .second {
top: 4.5vmin;
left: 2vmin;
}
.navbar .third {
top: 6.5vmin;
left: 2vmin;
}
.navbar.active .first {
width: 4vmin;
transform: translate(0vmin, 4.75vmin) rotate(50deg);
transition: all 0.5s;
}
.navbar.active .second {
opacity: 0;
transition: all 0.5s;
}
.navbar.active .third {
width: 4vmin;
transform: translate(2.25vmin, 0.5vmin) rotate(-50deg);
transition: all 0.5s;
}
.navbar.active {
border-radius:5vmin;
transition: all 0.3s ease;
}
.mainbody {
position: relative;
width: 100%;
top: 13vmin;
z-index:1;
}
.dropdown-content.active {
display: block;
}
</style>
<div class="dropdownzzz" style="background-color:black;">
<button class="dropbtn" style="background-color:black;" id="menu">
<div class="navbar" id="iconmenu">
<div class="first"></div>
<div class="second"></div>
<div class="third"></div>
</div>
</button>
<div class="dropdown-content" id="there">
Link 1
Link 2
Link 3
</div>
</div>
<div class="header" style="background-color:black;">
<table style="background-color:black;">
<tr>
<td>Home</td>
<td>IT</td>
<td>Science</td>
<td>Tech</td>
<td>News</td>
<td>Top</td>
</tr>
</table>
</div>
<div class="mainbody">
<h1>RoyHQ</h1>
</div>
<script>
$('#menu').on('click', function () {
$('#there').toggleClass('active');
$('#iconmenu').toggleClass('active');
});
</script>

password input shakes when I focus/unfocus on.username

When I focus/unfocus on password, no shaking happens, but when I focus/unfocus on username then the password shakes...
Why is that happening & how to stop that?
body {
background-color: royalblue; /*#f0f0f0;*/
}
label {
font-family: 'Montserrat', sans-serif;
font-size: 14px;
z-index: -1;
border: 0;
color: white;
position: relative;
}
.head {
color: white;
margin-left: 44%;
font-family: monospace;
font-size: 25px;
}
/*.content {
margin-top: 10%;
margin-left: 41%;
}*/
.password {
margin-top: 5%;
}
form {
position: relative;
}
input {
position: absolute;
font-family: 'Montserrat', sans-serif;
font-size: 15px;
background: transparent;
border: 0; /* BORDER yes/no */
border-bottom: 2px solid beige;
background: transparent;
outline: 0;
height: 25px;
width: 180px;
z-index: 1;
margin-top: 5px;
}
/*input:focus {
outline: 1;
}*/
label::after {
content: '';
position: absolute;
top: 1px;
left: 0;
width: 180px;
height: 25px;
border-radius: 2px;
transition: transform .3s;
}
label::after{
z-index: -1;
background: beige; /*#a86bf;*/
transform: scale3d(1, 0, 1);
transform-origin: 0% 0%;
}
input:focus {
border-radius: 2px;
}
input:focus + label::after,
input:valid + label::after {
transform: scale3d(1, -1.3, 1);
transition-timing-function: linear;
top: -1px;
}
span {
position: relative;
margin-top: -30px;
display: block;
padding: .6em 0;
padding-left: -5px;
transition: top .5s ease, font-size .5s ease;
/* transition: transform 1s 2s;*/
top: 0;
}
input:focus + label > span,
input:valid + label > span {
top: -20px;
font-size: 11px;
padding-bottom: 15px;
}
/* font-family: monospace;*/
/*transform: translate3d(0, -80%, 0); */
/* transition-timing-function: linear;*/
<p class="head">Sign In</p>
<form>
<div class="content">
<div class="username">
<input name="name" class="user-input" id="user" required>
<label class="user-label" for="user"><span>Username</span></label>
</div>
<div class="password">
<input name="name" class="pass-input" id="pass" required>
<label class="pass-label" for="pass"><span>Password</span></label>
</div>
</div>
</form>
Add height to both div containers, so they keep it when clicked on.
body {
background-color: royalblue; /*#f0f0f0;*/
}
label {
font-family: 'Montserrat', sans-serif;
font-size: 14px;
z-index: -1;
border: 0;
color: white;
position: relative;
}
.head {
color: white;
margin-left: 44%;
font-family: monospace;
font-size: 25px;
}
.username {
height:40px;
}
.password {
height:40px;
}
/*.content {
margin-top: 10%;
margin-left: 41%;
}*/
.password {
margin-top: 5%;
}
form {
position: relative;
}
input {
position: absolute;
font-family: 'Montserrat', sans-serif;
font-size: 15px;
background: transparent;
border: 0; /* BORDER yes/no */
border-bottom: 2px solid beige;
background: transparent;
outline: 0;
height: 25px;
width: 180px;
z-index: 1;
margin-top: 5px;
}
/*input:focus {
outline: 1;
}*/
label::after {
content: '';
position: absolute;
top: 1px;
left: 0;
width: 180px;
height: 25px;
border-radius: 2px;
transition: transform .3s;
}
label::after{
z-index: -1;
background: beige; /*#a86bf;*/
transform: scale3d(1, 0, 1);
transform-origin: 0% 0%;
}
input:focus {
border-radius: 2px;
}
input:focus + label::after,
input:valid + label::after {
transform: scale3d(1, -1.3, 1);
transition-timing-function: linear;
top: -1px;
}
span {
position: relative;
margin-top: -30px;
display: block;
padding: .6em 0;
padding-left: -5px;
transition: top .5s ease, font-size .5s ease;
/* transition: transform 1s 2s;*/
top: 0;
}
input:focus + label > span,
input:valid + label > span {
top: -20px;
font-size: 11px;
padding-bottom: 15px;
}
/* font-family: monospace;*/
/*transform: translate3d(0, -80%, 0); */
/* transition-timing-function: linear;*/
<p class="head">Sign In</p>
<form>
<div class="content">
<div class="username" >
<input name="name" class="user-input" id="user" required>
<label class="user-label" for="user"><span>Username</span></label>
</div>
<div class="password" >
<input name="name" class="pass-input" id="pass" required>
<label class="pass-label" for="pass"><span>Password</span></label>
</div>
</div>
</form>
What I think's happening is that your CSS is adding a small margin to the bottom of the <div class="username"> and this is causing your "shaking". The reason it's not happening when you click on the Password is because there's nothing under it.

JS free Button linked with a "popup"/overlay

I try to open a 'popup'/overlay with a javascript button. Unfortunately my button does not to open it.
Where I am making mistake? Is there a better way to do it?
It should be javascript free.
…………………………………………………………………………………………………………………
/* popup */
.overlay {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
background: rgba(0, 0, 0, 0.7);
transition: opacity 500ms;
visibility: hidden;
opacity: 0;
}
.overlay:target {
visibility: visible;
opacity: 1;
}
.popup {
margin: 70px auto;
padding: 20px;
background: #fff;
border-radius: 5px;
width: 80%;
height: 80%;
position: relative;
transition: all 5s ease-in-out;
}
.popup h2 {
margin-top: 0;
color: #333;
font-family: Tahoma, Arial, sans-serif;
}
.popup .close {
position: absolute;
top: 2%;
right: 4%;
transition: all 200ms;
font-size: 30px;
font-weight: bold;
text-decoration: none;
color: #333;
}
.popup .close:hover {
color: orange;
}
.popup .content {
max-height: 30%;
overflow: auto;
}
<button href="#popup4">btn1</button>
<div id="popup4" class="overlay">
<div class="popup"><h2>Here i am</h2>
<a class="close" href="#">×</a>
<div class="content">
Thank to pop me out of that button, but now i'm done so you can close this window.
</div>
</div>
</div>
Your button alone doesn't do anything, it has to submit via a form.
<form method="get" action="#popup4">
<button>btn1</button>
</form>

How to always show up pure HTML5/CSS modal window without clicking a link which activates it?

I have a pure HTML5/CSS modal window inside Razor View UserPanel in ASP.NET MVC application. I can activate this modal window by clicking a link: <p>Activate Modal</p>the problem is I want it to be displayed always when visiting /UserPanel page and don't have to click on this button.
The short html and then full css for the modal(it works - > the modal shows up only after clicking the button):
html:
<div class="container">
<p>Activate Modal</p>
</div>
<div id="modal">
<div class="modal-content">
<div class="header">
<h2>Notification</h2>
</div>
<div class="copy">
<p>There is new Announcment to read!</p>
</div>
<div class="cf footer">
Close
</div>
</div>
<div class="overlay"></div>
</div>
css:
<style>
#modal {
left: 50%;
margin: -250px 0 0 -40%;
opacity: 0;
position: absolute;
top: -50%;
visibility: hidden;
width: 80%;
box-shadow: 0 3px 7px rgba(0,0,0,.25);
box-sizing: border-box;
transition: all 0.4s ease-in-out;
-moz-transition: all 0.4s ease-in-out;
-webkit-transition: all 0.4s ease-in-out;
}
#modal:target {
opacity: 1;
top: 50%;
visibility: visible;
}
#modal .header, #modal .footer {
border-bottom: 1px solid #e7e7e7;
border-radius: 5px 5px 0 0;
}
#modal .footer {
border: none;
border-top: 1px solid #e7e7e7;
border-radius: 0 0 5px 5px;
}
#modal h2 {
margin: 0;
}
#modal .btn {
float: right;
}
#modal .copy, #modal .header, #modal .footer {
padding: 15px;
}
.modal-content {
background: #f7f7f7;
position: relative;
z-index: 20;
border-radius: 5px;
}
#modal .copy {
background: #fff;
}
#modal .overlay {
background-color: #000;
background: rgba(0,0,0,.5);
height: 100%;
left: 0;
position: fixed;
top: 0;
width: 100%;
z-index: 10;
}
</style>
Question: How to always show modal when visiting this page?
Change your HTML to this (we simply target the close button):
<div id="modal">
<div class="modal-content">
<div class="header">
<h2>Notification</h2>
</div>
<div class="copy">
<p>There is new Announcment to read!</p>
</div>
<div class="cf footer">
Close
</div>
</div>
<div class="overlay"></div>
</div>
and now the CSS to this:
#modal {
left: 50%;
margin: -250px 0 0 -40%;
opacity: 1;
position: absolute;
top: 50%;
visibility: visible;
width: 80%;
box-shadow: 0 3px 7px rgba(0,0,0,.25);
box-sizing: border-box;
transition: all 0.4s ease-in-out;
-moz-transition: all 0.4s ease-in-out;
-webkit-transition: all 0.4s ease-in-out;
}
#modal:target{
opacity: 0;
top: -50%;
visibility: hidden;
}
#modal .header, #modal .footer {
border-bottom: 1px solid #e7e7e7;
border-radius: 5px 5px 0 0;
}
#modal .footer {
border: none;
border-top: 1px solid #e7e7e7;
border-radius: 0 0 5px 5px;
}
#modal h2 {
margin: 0;
}
#modal .btn {
float: right;
}
#modal .copy, #modal .header, #modal .footer {
padding: 15px;
}
.modal-content {
background: #f7f7f7;
position: relative;
z-index: 20;
border-radius: 5px;
}
#modal .copy {
background: #fff;
}
#modal .overlay {
background-color: #000;
background: rgba(0,0,0,.5);
height: 100%;
left: 0;
position: fixed;
top: 0;
width: 100%;
z-index: 10;
}
we simply make the modal show by default, then hide it on click. Of course, if you want it always visible, just delete the close button. See fiddle here
i hope ths code will help
<div class="container">
<div id="modal">
<div class="modal-content">
<div class="header">
<h2>Notification</h2>
</div>
<div class="copy">
<p>There is new Announcment to read!</p>
</div>
<div class="cf footer">
Close
</div>
</div>
<div class="overlay"></div>
#modal {
left: 50%;
margin: -250px 0 0 -40%;
opacity: 0;
position: absolute;
top: -50%;
visibility: hidden;
width: 80%;
box-shadow: 0 3px 7px rgba(0,0,0,.25);
box-sizing: border-box;
transition: all 0.4s ease-in-out;
-moz-transition: all 0.4s ease-in-out;
-webkit-transition: all 0.4s ease-in-out;
opacity: 1;
top: 50%;
visibility: visible;
}
#modal .header, #modal .footer {
border-bottom: 1px solid #e7e7e7;
border-radius: 5px 5px 0 0;
}
#modal .footer {
border: none;
border-top: 1px solid #e7e7e7;
border-radius: 0 0 5px 5px;
}
#modal h2 {
margin: 0;
}
#modal .btn {
float: right;
}
#modal .copy, #modal .header, #modal .footer {
padding: 15px;
}
.modal-content {
background: #f7f7f7;
position: relative;
z-index: 20;
border-radius: 5px;
}
#modal .copy {
background: #fff;
}
#modal .overlay {
background-color: #000;
background: rgba(0,0,0,.5);
height: 100%;
left: 0;
position: fixed;
top: 0;
width: 100%;
z-index: 10;
}

Resources